From 6c49b1285087b66e741033859a64acc4038bd092 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Mon, 21 Aug 2023 21:39:06 +0200 Subject: [PATCH] Add instrumentation API and native OpenTelemetry implementation (#588) Signed-off-by: Alexander Wert Co-authored-by: Sylvain Wallez --- .../netty/NettyTransportHttpClient.java | 10 +- java-client/build.gradle.kts | 40 +- .../AsyncSearchStatusRequest.java | 17 + .../DeleteAsyncSearchRequest.java | 17 + .../async_search/GetAsyncSearchRequest.java | 15 + .../async_search/SubmitRequest.java | 18 + .../DeleteAutoscalingPolicyRequest.java | 17 + .../GetAutoscalingCapacityRequest.java | 5 + .../GetAutoscalingPolicyRequest.java | 17 + .../PutAutoscalingPolicyRequest.java | 17 + .../elasticsearch/cat/AliasesRequest.java | 18 + .../elasticsearch/cat/AllocationRequest.java | 18 + .../cat/ComponentTemplatesRequest.java | 18 + .../elasticsearch/cat/CountRequest.java | 18 + .../elasticsearch/cat/FielddataRequest.java | 18 + .../elasticsearch/cat/HealthRequest.java | 6 + .../elasticsearch/cat/HelpRequest.java | 6 + .../elasticsearch/cat/IndicesRequest.java | 18 + .../elasticsearch/cat/MasterRequest.java | 6 + .../cat/MlDataFrameAnalyticsRequest.java | 18 + .../elasticsearch/cat/MlDatafeedsRequest.java | 18 + .../elasticsearch/cat/MlJobsRequest.java | 18 + .../cat/MlTrainedModelsRequest.java | 18 + .../elasticsearch/cat/NodeattrsRequest.java | 6 + .../elasticsearch/cat/NodesRequest.java | 6 + .../cat/PendingTasksRequest.java | 6 + .../elasticsearch/cat/PluginsRequest.java | 6 + .../elasticsearch/cat/RecoveryRequest.java | 18 + .../cat/RepositoriesRequest.java | 6 + .../elasticsearch/cat/SegmentsRequest.java | 18 + .../elasticsearch/cat/ShardsRequest.java | 18 + .../elasticsearch/cat/SnapshotsRequest.java | 18 + .../elasticsearch/cat/TasksRequest.java | 6 + .../elasticsearch/cat/TemplatesRequest.java | 18 + .../elasticsearch/cat/ThreadPoolRequest.java | 19 + .../elasticsearch/cat/TransformsRequest.java | 18 + .../elasticsearch/ccr/CcrStatsRequest.java | 5 + .../ccr/DeleteAutoFollowPatternRequest.java | 17 + .../elasticsearch/ccr/FollowInfoRequest.java | 17 + .../elasticsearch/ccr/FollowRequest.java | 15 + .../elasticsearch/ccr/FollowStatsRequest.java | 17 + .../ccr/ForgetFollowerRequest.java | 17 + .../ccr/GetAutoFollowPatternRequest.java | 20 + .../ccr/PauseAutoFollowPatternRequest.java | 17 + .../elasticsearch/ccr/PauseFollowRequest.java | 17 + .../ccr/PutAutoFollowPatternRequest.java | 16 + .../ccr/ResumeAutoFollowPatternRequest.java | 17 + .../ccr/ResumeFollowRequest.java | 17 + .../elasticsearch/ccr/UnfollowRequest.java | 17 + .../cluster/AllocationExplainRequest.java | 6 + .../cluster/ClusterInfoRequest.java | 18 + .../cluster/ClusterStatsRequest.java | 18 + .../DeleteComponentTemplateRequest.java | 15 + .../DeleteVotingConfigExclusionsRequest.java | 6 + .../ExistsComponentTemplateRequest.java | 15 + .../cluster/GetClusterSettingsRequest.java | 6 + .../cluster/GetComponentTemplateRequest.java | 18 + .../elasticsearch/cluster/HealthRequest.java | 18 + .../cluster/PendingTasksRequest.java | 6 + .../PostVotingConfigExclusionsRequest.java | 6 + .../cluster/PutClusterSettingsRequest.java | 6 + .../cluster/PutComponentTemplateRequest.java | 15 + .../cluster/RemoteInfoRequest.java | 5 + .../elasticsearch/cluster/RerouteRequest.java | 6 + .../elasticsearch/cluster/StateRequest.java | 25 ++ .../elasticsearch/core/BulkRequest.java | 18 + .../core/ClearScrollRequest.java | 5 + .../core/ClosePointInTimeRequest.java | 5 + .../elasticsearch/core/CountRequest.java | 18 + .../elasticsearch/core/CreateRequest.java | 18 + .../core/DeleteByQueryRequest.java | 15 + .../core/DeleteByQueryRethrottleRequest.java | 15 + .../elasticsearch/core/DeleteRequest.java | 18 + .../core/DeleteScriptRequest.java | 15 + .../elasticsearch/core/ExistsRequest.java | 18 + .../core/ExistsSourceRequest.java | 18 + .../elasticsearch/core/ExplainRequest.java | 18 + .../elasticsearch/core/FieldCapsRequest.java | 18 + .../elasticsearch/core/GetRequest.java | 18 + .../core/GetScriptContextRequest.java | 5 + .../core/GetScriptLanguagesRequest.java | 5 + .../elasticsearch/core/GetScriptRequest.java | 15 + .../elasticsearch/core/GetSourceRequest.java | 18 + .../core/HealthReportRequest.java | 18 + .../elasticsearch/core/IndexRequest.java | 22 ++ .../elasticsearch/core/InfoRequest.java | 5 + .../elasticsearch/core/KnnSearchRequest.java | 15 + .../elasticsearch/core/MgetRequest.java | 18 + .../elasticsearch/core/MsearchRequest.java | 18 + .../core/MsearchTemplateRequest.java | 18 + .../core/MtermvectorsRequest.java | 18 + .../core/OpenPointInTimeRequest.java | 15 + .../elasticsearch/core/PingRequest.java | 5 + .../elasticsearch/core/PutScriptRequest.java | 22 ++ .../elasticsearch/core/RankEvalRequest.java | 18 + .../elasticsearch/core/ReindexRequest.java | 6 + .../core/ReindexRethrottleRequest.java | 15 + .../core/RenderSearchTemplateRequest.java | 19 + .../core/ScriptsPainlessExecuteRequest.java | 5 + .../elasticsearch/core/ScrollRequest.java | 5 + .../elasticsearch/core/SearchMvtRequest.java | 28 ++ .../elasticsearch/core/SearchRequest.java | 18 + .../core/SearchShardsRequest.java | 18 + .../core/SearchTemplateRequest.java | 18 + .../elasticsearch/core/TermsEnumRequest.java | 17 + .../core/TermvectorsRequest.java | 22 ++ .../core/UpdateByQueryRequest.java | 15 + .../core/UpdateByQueryRethrottleRequest.java | 15 + .../elasticsearch/core/UpdateRequest.java | 18 + .../DeleteDanglingIndexRequest.java | 15 + .../ImportDanglingIndexRequest.java | 15 + .../ListDanglingIndicesRequest.java | 5 + .../enrich/DeletePolicyRequest.java | 17 + .../enrich/EnrichStatsRequest.java | 5 + .../enrich/ExecutePolicyRequest.java | 15 + .../enrich/GetPolicyRequest.java | 20 + .../enrich/PutPolicyRequest.java | 17 + .../elasticsearch/eql/EqlDeleteRequest.java | 17 + .../elasticsearch/eql/EqlGetRequest.java | 15 + .../elasticsearch/eql/EqlSearchRequest.java | 15 + .../eql/GetEqlStatusRequest.java | 17 + .../features/GetFeaturesRequest.java | 5 + .../features/ResetFeaturesRequest.java | 5 + .../fleet/FleetSearchRequest.java | 15 + .../elasticsearch/graph/ExploreRequest.java | 15 + .../ilm/DeleteLifecycleRequest.java | 15 + .../ilm/ExplainLifecycleRequest.java | 15 + .../ilm/GetIlmStatusRequest.java | 5 + .../ilm/GetLifecycleRequest.java | 18 + .../ilm/MigrateToDataTiersRequest.java | 6 + .../elasticsearch/ilm/MoveToStepRequest.java | 17 + .../ilm/PutLifecycleRequest.java | 15 + .../ilm/RemovePolicyRequest.java | 17 + .../elasticsearch/ilm/RetryRequest.java | 17 + .../elasticsearch/ilm/StartIlmRequest.java | 6 + .../elasticsearch/ilm/StopIlmRequest.java | 6 + .../indices/AddBlockRequest.java | 18 + .../elasticsearch/indices/AnalyzeRequest.java | 20 + .../indices/ClearCacheRequest.java | 18 + .../indices/CloneIndexRequest.java | 18 + .../indices/CloseIndexRequest.java | 15 + .../indices/CreateDataStreamRequest.java | 17 + .../indices/CreateIndexRequest.java | 15 + .../indices/DataStreamsStatsRequest.java | 18 + .../indices/DeleteAliasRequest.java | 22 ++ .../indices/DeleteDataLifecycleRequest.java | 15 + .../indices/DeleteDataStreamRequest.java | 15 + .../indices/DeleteIndexRequest.java | 15 + .../indices/DeleteIndexTemplateRequest.java | 15 + .../indices/DeleteTemplateRequest.java | 15 + .../indices/DiskUsageRequest.java | 15 + .../indices/DownsampleRequest.java | 20 + .../indices/ExistsAliasRequest.java | 22 ++ .../indices/ExistsIndexTemplateRequest.java | 15 + .../elasticsearch/indices/ExistsRequest.java | 15 + .../indices/ExistsTemplateRequest.java | 15 + .../indices/ExplainDataLifecycleRequest.java | 15 + .../indices/FieldUsageStatsRequest.java | 15 + .../elasticsearch/indices/FlushRequest.java | 18 + .../indices/ForcemergeRequest.java | 18 + .../indices/GetAliasRequest.java | 28 ++ .../indices/GetDataLifecycleRequest.java | 15 + .../indices/GetDataStreamRequest.java | 18 + .../indices/GetFieldMappingRequest.java | 22 ++ .../indices/GetIndexRequest.java | 15 + .../indices/GetIndexTemplateRequest.java | 18 + .../indices/GetIndicesSettingsRequest.java | 28 ++ .../indices/GetMappingRequest.java | 18 + .../indices/GetTemplateRequest.java | 18 + .../indices/IndicesStatsRequest.java | 28 ++ .../indices/MigrateToDataStreamRequest.java | 17 + .../indices/ModifyDataStreamRequest.java | 5 + .../elasticsearch/indices/OpenRequest.java | 15 + .../indices/PromoteDataStreamRequest.java | 17 + .../indices/PutAliasRequest.java | 22 ++ .../indices/PutDataLifecycleRequest.java | 15 + .../indices/PutIndexTemplateRequest.java | 15 + .../indices/PutIndicesSettingsRequest.java | 18 + .../indices/PutMappingRequest.java | 15 + .../indices/PutTemplateRequest.java | 15 + .../indices/RecoveryRequest.java | 18 + .../elasticsearch/indices/RefreshRequest.java | 18 + .../indices/ReloadSearchAnalyzersRequest.java | 15 + .../indices/ResolveIndexRequest.java | 15 + .../indices/RolloverRequest.java | 22 ++ .../indices/SegmentsRequest.java | 18 + .../indices/ShardStoresRequest.java | 18 + .../elasticsearch/indices/ShrinkRequest.java | 18 + .../indices/SimulateIndexTemplateRequest.java | 15 + .../indices/SimulateTemplateRequest.java | 18 + .../elasticsearch/indices/SplitRequest.java | 18 + .../indices/UnfreezeRequest.java | 15 + .../indices/UpdateAliasesRequest.java | 6 + .../indices/ValidateQueryRequest.java | 18 + .../ingest/DeletePipelineRequest.java | 15 + .../ingest/GeoIpStatsRequest.java | 5 + .../ingest/GetPipelineRequest.java | 18 + .../ingest/ProcessorGrokRequest.java | 5 + .../ingest/PutPipelineRequest.java | 15 + .../elasticsearch/ingest/SimulateRequest.java | 18 + .../license/DeleteLicenseRequest.java | 5 + .../license/GetBasicStatusRequest.java | 5 + .../license/GetLicenseRequest.java | 6 + .../license/GetTrialStatusRequest.java | 5 + .../elasticsearch/license/PostRequest.java | 6 + .../license/PostStartBasicRequest.java | 6 + .../license/PostStartTrialRequest.java | 6 + .../logstash/DeletePipelineRequest.java | 17 + .../logstash/GetPipelineRequest.java | 19 + .../logstash/PutPipelineRequest.java | 17 + .../migration/DeprecationsRequest.java | 20 + .../GetFeatureUpgradeStatusRequest.java | 5 + .../migration/PostFeatureUpgradeRequest.java | 5 + ...earTrainedModelDeploymentCacheRequest.java | 17 + .../elasticsearch/ml/CloseJobRequest.java | 17 + .../ml/DeleteCalendarEventRequest.java | 20 + .../ml/DeleteCalendarJobRequest.java | 20 + .../ml/DeleteCalendarRequest.java | 17 + .../ml/DeleteDataFrameAnalyticsRequest.java | 15 + .../ml/DeleteDatafeedRequest.java | 15 + .../ml/DeleteExpiredDataRequest.java | 20 + .../elasticsearch/ml/DeleteFilterRequest.java | 17 + .../ml/DeleteForecastRequest.java | 22 ++ .../elasticsearch/ml/DeleteJobRequest.java | 15 + .../ml/DeleteModelSnapshotRequest.java | 20 + .../ml/DeleteTrainedModelAliasRequest.java | 20 + .../ml/DeleteTrainedModelRequest.java | 15 + .../ml/EstimateModelMemoryRequest.java | 5 + .../ml/EvaluateDataFrameRequest.java | 5 + .../ml/ExplainDataFrameAnalyticsRequest.java | 20 + .../elasticsearch/ml/FlushJobRequest.java | 17 + .../elasticsearch/ml/ForecastRequest.java | 17 + .../elasticsearch/ml/GetBucketsRequest.java | 22 ++ .../ml/GetCalendarEventsRequest.java | 15 + .../elasticsearch/ml/GetCalendarsRequest.java | 18 + .../ml/GetCategoriesRequest.java | 22 ++ .../ml/GetDataFrameAnalyticsRequest.java | 18 + .../ml/GetDataFrameAnalyticsStatsRequest.java | 18 + .../ml/GetDatafeedStatsRequest.java | 18 + .../elasticsearch/ml/GetDatafeedsRequest.java | 18 + .../elasticsearch/ml/GetFiltersRequest.java | 18 + .../ml/GetInfluencersRequest.java | 15 + .../elasticsearch/ml/GetJobStatsRequest.java | 18 + .../elasticsearch/ml/GetJobsRequest.java | 18 + .../ml/GetMemoryStatsRequest.java | 18 + .../GetModelSnapshotUpgradeStatsRequest.java | 18 + .../ml/GetModelSnapshotsRequest.java | 22 ++ .../ml/GetOverallBucketsRequest.java | 17 + .../elasticsearch/ml/GetRecordsRequest.java | 15 + .../ml/GetTrainedModelsRequest.java | 18 + .../ml/GetTrainedModelsStatsRequest.java | 18 + .../ml/InferTrainedModelRequest.java | 18 + .../elasticsearch/ml/MlInfoRequest.java | 5 + .../elasticsearch/ml/OpenJobRequest.java | 17 + .../ml/PostCalendarEventsRequest.java | 17 + .../elasticsearch/ml/PostDataRequest.java | 15 + .../ml/PreviewDataFrameAnalyticsRequest.java | 20 + .../ml/PreviewDatafeedRequest.java | 18 + .../ml/PutCalendarJobRequest.java | 20 + .../elasticsearch/ml/PutCalendarRequest.java | 17 + .../ml/PutDataFrameAnalyticsRequest.java | 16 + .../elasticsearch/ml/PutDatafeedRequest.java | 15 + .../elasticsearch/ml/PutFilterRequest.java | 17 + .../elasticsearch/ml/PutJobRequest.java | 17 + .../ml/PutTrainedModelAliasRequest.java | 18 + .../PutTrainedModelDefinitionPartRequest.java | 20 + .../ml/PutTrainedModelRequest.java | 15 + .../ml/PutTrainedModelVocabularyRequest.java | 17 + .../elasticsearch/ml/ResetJobRequest.java | 15 + .../ml/RevertModelSnapshotRequest.java | 20 + .../ml/SetUpgradeModeRequest.java | 6 + .../ml/StartDataFrameAnalyticsRequest.java | 15 + .../ml/StartDatafeedRequest.java | 17 + .../StartTrainedModelDeploymentRequest.java | 15 + .../ml/StopDataFrameAnalyticsRequest.java | 15 + .../elasticsearch/ml/StopDatafeedRequest.java | 17 + .../ml/StopTrainedModelDeploymentRequest.java | 15 + .../ml/UpdateDataFrameAnalyticsRequest.java | 17 + .../ml/UpdateDatafeedRequest.java | 15 + .../elasticsearch/ml/UpdateFilterRequest.java | 17 + .../elasticsearch/ml/UpdateJobRequest.java | 16 + .../ml/UpdateModelSnapshotRequest.java | 20 + .../ml/UpgradeJobSnapshotRequest.java | 18 + .../ml/ValidateDetectorRequest.java | 5 + .../elasticsearch/ml/ValidateRequest.java | 5 + .../elasticsearch/monitoring/BulkRequest.java | 18 + ...earRepositoriesMeteringArchiveRequest.java | 20 + .../GetRepositoriesMeteringInfoRequest.java | 17 + .../nodes/HotThreadsRequest.java | 18 + .../elasticsearch/nodes/NodesInfoRequest.java | 28 ++ .../nodes/NodesStatsRequest.java | 42 ++ .../nodes/NodesUsageRequest.java | 28 ++ .../nodes/ReloadSecureSettingsRequest.java | 18 + .../DeleteQueryRulesetRequest.java | 17 + .../query_ruleset/GetQueryRulesetRequest.java | 17 + .../query_ruleset/ListRequest.java | 6 + .../query_ruleset/PutRequest.java | 17 + .../rollup/DeleteJobRequest.java | 17 + .../elasticsearch/rollup/GetJobsRequest.java | 20 + .../rollup/GetRollupCapsRequest.java | 20 + .../rollup/GetRollupIndexCapsRequest.java | 17 + .../elasticsearch/rollup/PutJobRequest.java | 16 + .../rollup/RollupSearchRequest.java | 16 + .../elasticsearch/rollup/StartJobRequest.java | 17 + .../elasticsearch/rollup/StopJobRequest.java | 15 + .../DeleteBehavioralAnalyticsRequest.java | 17 + .../DeleteSearchApplicationRequest.java | 17 + .../GetBehavioralAnalyticsRequest.java | 20 + .../GetSearchApplicationRequest.java | 17 + .../search_application/ListRequest.java | 6 + .../PutBehavioralAnalyticsRequest.java | 17 + .../search_application/PutRequest.java | 15 + .../SearchApplicationSearchRequest.java | 16 + .../CacheStatsRequest.java | 18 + .../ClearCacheRequest.java | 18 + .../searchable_snapshots/MountRequest.java | 18 + .../SearchableSnapshotsStatsRequest.java | 18 + .../security/ActivateUserProfileRequest.java | 5 + .../security/AuthenticateRequest.java | 5 + .../security/ChangePasswordRequest.java | 18 + .../security/ClearApiKeyCacheRequest.java | 17 + .../ClearCachedPrivilegesRequest.java | 17 + .../security/ClearCachedRealmsRequest.java | 15 + .../security/ClearCachedRolesRequest.java | 17 + .../ClearCachedServiceTokensRequest.java | 23 ++ .../security/CreateApiKeyRequest.java | 6 + .../security/CreateServiceTokenRequest.java | 26 ++ .../security/DeletePrivilegesRequest.java | 18 + .../security/DeleteRoleMappingRequest.java | 15 + .../security/DeleteRoleRequest.java | 15 + .../security/DeleteServiceTokenRequest.java | 21 + .../security/DeleteUserRequest.java | 15 + .../security/DisableUserProfileRequest.java | 15 + .../security/DisableUserRequest.java | 15 + .../security/EnableUserProfileRequest.java | 15 + .../security/EnableUserRequest.java | 15 + .../security/EnrollKibanaRequest.java | 5 + .../security/EnrollNodeRequest.java | 5 + .../security/GetApiKeyRequest.java | 6 + .../security/GetBuiltinPrivilegesRequest.java | 5 + .../security/GetPrivilegesRequest.java | 27 ++ .../security/GetRoleMappingRequest.java | 20 + .../security/GetRoleRequest.java | 20 + .../security/GetServiceAccountsRequest.java | 27 ++ .../GetServiceCredentialsRequest.java | 20 + .../security/GetTokenRequest.java | 5 + .../security/GetUserPrivilegesRequest.java | 6 + .../security/GetUserProfileRequest.java | 15 + .../security/GetUserRequest.java | 18 + .../security/GrantApiKeyRequest.java | 5 + .../security/HasPrivilegesRequest.java | 20 + .../HasPrivilegesUserProfileRequest.java | 5 + .../security/InvalidateApiKeyRequest.java | 5 + .../security/InvalidateTokenRequest.java | 5 + .../security/PutPrivilegesRequest.java | 6 + .../security/PutRoleMappingRequest.java | 15 + .../security/PutRoleRequest.java | 15 + .../security/PutUserRequest.java | 15 + .../security/QueryApiKeysRequest.java | 6 + .../security/SamlAuthenticateRequest.java | 5 + .../security/SamlCompleteLogoutRequest.java | 5 + .../security/SamlInvalidateRequest.java | 5 + .../security/SamlLogoutRequest.java | 5 + .../SamlPrepareAuthenticationRequest.java | 5 + .../SamlServiceProviderMetadataRequest.java | 17 + .../security/SuggestUserProfilesRequest.java | 5 + .../security/UpdateApiKeyRequest.java | 16 + .../UpdateUserProfileDataRequest.java | 15 + .../shutdown/DeleteNodeRequest.java | 15 + .../shutdown/GetNodeRequest.java | 18 + .../shutdown/PutNodeRequest.java | 15 + .../slm/DeleteLifecycleRequest.java | 17 + .../slm/ExecuteLifecycleRequest.java | 17 + .../slm/ExecuteRetentionRequest.java | 5 + .../slm/GetLifecycleRequest.java | 20 + .../slm/GetSlmStatusRequest.java | 5 + .../elasticsearch/slm/GetStatsRequest.java | 5 + .../slm/PutLifecycleRequest.java | 15 + .../elasticsearch/slm/StartSlmRequest.java | 5 + .../elasticsearch/slm/StopSlmRequest.java | 5 + .../snapshot/CleanupRepositoryRequest.java | 15 + .../snapshot/CloneSnapshotRequest.java | 21 + .../snapshot/CreateRepositoryRequest.java | 15 + .../snapshot/CreateSnapshotRequest.java | 18 + .../snapshot/DeleteRepositoryRequest.java | 15 + .../snapshot/DeleteSnapshotRequest.java | 18 + .../snapshot/GetRepositoryRequest.java | 18 + .../snapshot/GetSnapshotRequest.java | 18 + .../snapshot/RestoreRequest.java | 18 + .../snapshot/SnapshotStatusRequest.java | 25 ++ .../snapshot/VerifyRepositoryRequest.java | 15 + .../elasticsearch/sql/ClearCursorRequest.java | 5 + .../elasticsearch/sql/DeleteAsyncRequest.java | 17 + .../elasticsearch/sql/GetAsyncRequest.java | 15 + .../sql/GetAsyncStatusRequest.java | 17 + .../elasticsearch/sql/QueryRequest.java | 6 + .../elasticsearch/sql/TranslateRequest.java | 5 + .../ssl/CertificatesRequest.java | 5 + .../synonyms/DeleteSynonymRequest.java | 17 + .../synonyms/DeleteSynonymRuleRequest.java | 20 + .../synonyms/GetSynonymRequest.java | 15 + .../synonyms/GetSynonymRuleRequest.java | 20 + .../synonyms/GetSynonymsSetsRequest.java | 6 + .../synonyms/PutSynonymRequest.java | 17 + .../synonyms/PutSynonymRuleRequest.java | 20 + .../elasticsearch/tasks/CancelRequest.java | 18 + .../elasticsearch/tasks/GetTasksRequest.java | 15 + .../elasticsearch/tasks/ListRequest.java | 6 + .../transform/DeleteTransformRequest.java | 15 + .../transform/GetTransformRequest.java | 19 + .../transform/GetTransformStatsRequest.java | 16 + .../transform/PreviewTransformRequest.java | 18 + .../transform/PutTransformRequest.java | 15 + .../transform/ResetTransformRequest.java | 15 + .../ScheduleNowTransformRequest.java | 15 + .../transform/StartTransformRequest.java | 15 + .../transform/StopTransformRequest.java | 15 + .../transform/UpdateTransformRequest.java | 15 + .../transform/UpgradeTransformsRequest.java | 6 + .../watcher/AckWatchRequest.java | 24 ++ .../watcher/ActivateWatchRequest.java | 17 + .../watcher/DeactivateWatchRequest.java | 17 + .../watcher/DeleteWatchRequest.java | 17 + .../watcher/ExecuteWatchRequest.java | 18 + .../watcher/GetWatchRequest.java | 17 + .../watcher/PutWatchRequest.java | 15 + .../watcher/QueryWatchesRequest.java | 5 + .../watcher/StartWatcherRequest.java | 5 + .../watcher/StopWatcherRequest.java | 5 + .../watcher/WatcherStatsRequest.java | 19 + .../elasticsearch/xpack/XpackInfoRequest.java | 6 + .../xpack/XpackUsageRequest.java | 6 + .../transport/ElasticsearchTransportBase.java | 82 +++- .../elastic/clients/transport/Endpoint.java | 8 + .../transport/endpoints/BinaryEndpoint.java | 8 +- .../transport/endpoints/BooleanEndpoint.java | 4 +- .../endpoints/DelegatingJsonEndpoint.java | 5 + .../transport/endpoints/EndpointBase.java | 9 + .../transport/endpoints/SimpleEndpoint.java | 6 +- .../endpoints/SimpleJsonEndpoint.java | 6 +- .../instrumentation/Instrumentation.java | 79 ++++ .../instrumentation/NoopInstrumentation.java | 70 ++++ .../OpenTelemetryForElasticsearch.java | 367 ++++++++++++++++++ .../rest_client/RestClientTransport.java | 9 +- .../experiments/api/FooOptRequest.java | 1 + .../experiments/api/FooRequest.java | 1 + .../experiments/generics/GenericClass.java | 5 +- .../OpenTelemetryForElasticsearchTest.java | 275 +++++++++++++ 448 files changed, 7351 insertions(+), 46 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/transport/instrumentation/Instrumentation.java create mode 100644 java-client/src/main/java/co/elastic/clients/transport/instrumentation/NoopInstrumentation.java create mode 100644 java-client/src/main/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearch.java create mode 100644 java-client/src/test/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearchTest.java diff --git a/example-transports/src/main/java/co/elastic/clients/transport/netty/NettyTransportHttpClient.java b/example-transports/src/main/java/co/elastic/clients/transport/netty/NettyTransportHttpClient.java index adad5d9be..fcd4b9747 100644 --- a/example-transports/src/main/java/co/elastic/clients/transport/netty/NettyTransportHttpClient.java +++ b/example-transports/src/main/java/co/elastic/clients/transport/netty/NettyTransportHttpClient.java @@ -56,9 +56,9 @@ import javax.annotation.Nullable; import javax.net.ssl.SSLException; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -231,12 +231,8 @@ private String queryString(Request request, TransportOptions options) { .entrySet() .stream() .map(e -> { - try { - return URLEncoder.encode(e.getKey(), "UTF-8") + "=" + - URLEncoder.encode(e.getValue(), "UTF-8"); - } catch(UnsupportedEncodingException ex) { - throw new RuntimeException(ex); - } + return URLEncoder.encode(e.getKey(), StandardCharsets.UTF_8) + "=" + + URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8); }) .collect(Collectors.joining("&")); } diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 8a2f9ae91..ebe28ac34 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -18,8 +18,8 @@ */ import com.github.jk1.license.ProjectData -import com.github.jk1.license.render.ReportRenderer import com.github.jk1.license.render.LicenseDataCollector +import com.github.jk1.license.render.ReportRenderer import java.io.FileWriter plugins { @@ -53,8 +53,8 @@ tasks.getByName("processResources") { if (name != "apis.json") { // Only process main source-set resources (test files are large) expand( - "version" to version, - "git_revision" to (if (rootProject.extra.has("gitHashFull")) rootProject.extra["gitHashFull"] else "unknown") + "version" to version, + "git_revision" to (if (rootProject.extra.has("gitHashFull")) rootProject.extra["gitHashFull"] else "unknown") ) } } @@ -69,7 +69,7 @@ tasks.withType { if (rootProject.extra.has("gitHashFull")) { val jar = this as Jar jar.manifest.attributes["X-Git-Revision"] = rootProject.extra["gitHashFull"] - jar.manifest.attributes["X-Git-Commit-Time"] = rootProject .extra["gitCommitTime"] + jar.manifest.attributes["X-Git-Commit-Time"] = rootProject.extra["gitCommitTime"] } else { throw GradleException("No git information available") } @@ -154,7 +154,7 @@ publishing { // are the same as the one used in the dependency section below. val xPathFactory = javax.xml.xpath.XPathFactory.newInstance() val depSelector = xPathFactory.newXPath() - .compile("/project/dependencies/dependency[groupId/text() = 'org.elasticsearch.client']") + .compile("/project/dependencies/dependency[groupId/text() = 'org.elasticsearch.client']") val versionSelector = xPathFactory.newXPath().compile("version") var foundVersion = false; @@ -183,6 +183,7 @@ dependencies { // the Java API client coexists with a 7.x HLRC work fine val elasticsearchVersion = "7.17.7" val jacksonVersion = "2.13.3" + val openTelemetryVersion = "1.29.0" // Apache 2.0 // https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html @@ -201,6 +202,13 @@ dependencies { // https://github.com/eclipse-ee4j/parsson api("org.eclipse.parsson:parsson:1.0.0") + // OpenTelemetry API for native instrumentation of the client. + // Apache 2.0 + // https://github.com/open-telemetry/opentelemetry-java + implementation("io.opentelemetry", "opentelemetry-api", openTelemetryVersion) + // Use it once it's stable (see Instrumentation.java). Limited to tests for now. + testImplementation("io.opentelemetry", "opentelemetry-semconv", "$openTelemetryVersion-alpha") + // EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 // https://github.com/eclipse-ee4j/jsonb-api compileOnly("jakarta.json.bind", "jakarta.json.bind-api", "2.0.0") @@ -236,6 +244,9 @@ dependencies { // https://www.testcontainers.org/ testImplementation("org.testcontainers", "testcontainers", "1.17.3") testImplementation("org.testcontainers", "elasticsearch", "1.17.3") + + + testImplementation("io.opentelemetry", "opentelemetry-sdk", openTelemetryVersion) } @@ -247,17 +258,18 @@ licenseReport { class SpdxReporter(val dest: File) : ReportRenderer { // License names to their SPDX identifier val spdxIds = mapOf( - "Apache License, Version 2.0" to "Apache-2.0", - "The Apache Software License, Version 2.0" to "Apache-2.0", - "BSD Zero Clause License" to "0BSD", - "Eclipse Public License 2.0" to "EPL-2.0", - "Eclipse Public License v. 2.0" to "EPL-2.0", - "Eclipse Public License - v 2.0" to "EPL-2.0", - "GNU General Public License, version 2 with the GNU Classpath Exception" to "GPL-2.0 WITH Classpath-exception-2.0", - "COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" to "CDDL-1.0" + "The Apache License, Version 2.0" to "Apache-2.0", + "Apache License, Version 2.0" to "Apache-2.0", + "The Apache Software License, Version 2.0" to "Apache-2.0", + "BSD Zero Clause License" to "0BSD", + "Eclipse Public License 2.0" to "EPL-2.0", + "Eclipse Public License v. 2.0" to "EPL-2.0", + "Eclipse Public License - v 2.0" to "EPL-2.0", + "GNU General Public License, version 2 with the GNU Classpath Exception" to "GPL-2.0 WITH Classpath-exception-2.0", + "COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" to "CDDL-1.0" ) - private fun quote(str: String) : String { + private fun quote(str: String): String { return if (str.contains(',') || str.contains("\"")) { "\"" + str.replace("\"", "\"\"") + "\"" } else { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java index 843aa740a..e1bcbcf53 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -149,6 +151,21 @@ public AsyncSearchStatusRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java index 39a040cdc..af4cd974f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -150,6 +152,21 @@ public DeleteAsyncSearchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java index 0b7746fd6..646a47c2a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java @@ -248,6 +248,21 @@ public GetAsyncSearchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java index 6f5422e97..68f544715 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java @@ -2436,6 +2436,24 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java index 810a27395..d4874e4c8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -149,6 +151,21 @@ public DeleteAutoscalingPolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java index 3d6db10dc..09825f147 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java @@ -77,6 +77,11 @@ public GetAutoscalingCapacityRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java index 88fb7bed3..0a93b6740 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public GetAutoscalingPolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java index 14a02d79b..53297c74d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -203,6 +205,21 @@ protected static JsonpDeserializer createPutAutosca }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java index f091381b8..65b2e10f8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java @@ -223,6 +223,24 @@ public AliasesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java index 12a032037..808c96d33 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java @@ -205,6 +205,24 @@ public AllocationRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java index 11bafaaf2..56f1f6de9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java @@ -162,6 +162,24 @@ public ComponentTemplatesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java index f11816dab..ab705c297 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java @@ -179,6 +179,24 @@ public CountRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java index 377d956c1..3698de1da 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java @@ -206,6 +206,24 @@ public FielddataRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _fields = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.fields())) + propsSet |= _fields; + + if (propsSet == 0) { + } + if (propsSet == (_fields)) { + params.put("fields", request.fields.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java index 9b880025b..5696e8fc6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -173,6 +174,11 @@ public HealthRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java index f4601d261..8a29eac44 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -74,6 +75,11 @@ public HelpRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java index c7ad9575a..43bc9771d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java @@ -369,6 +369,24 @@ public IndicesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java index 83171f1bd..b3646eb18 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -77,6 +78,11 @@ public MasterRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java index 3d4849d84..e1906df5c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java @@ -344,6 +344,24 @@ public MlDataFrameAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java index 028b40e0d..28c9c5b15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java @@ -327,6 +327,24 @@ public MlDatafeedsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + if (request.datafeedId() != null) + propsSet |= _datafeedId; + + if (propsSet == 0) { + } + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java index 581c402bf..e012626ce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java @@ -355,6 +355,24 @@ public MlJobsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + if (request.jobId() != null) + propsSet |= _jobId; + + if (propsSet == 0) { + } + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java index c253df989..627354866 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java @@ -365,6 +365,24 @@ public MlTrainedModelsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + if (request.modelId() != null) + propsSet |= _modelId; + + if (propsSet == 0) { + } + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java index 85d301192..1fc9c8506 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -77,6 +78,11 @@ public NodeattrsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java index bf74a3b65..8f9cdbeab 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -194,6 +195,11 @@ public NodesRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java index 8e44439ba..c98cd94e9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -77,6 +78,11 @@ public PendingTasksRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java index 27515f069..9a269c258 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -77,6 +78,11 @@ public PluginsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java index 596dc11ea..494566743 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java @@ -269,6 +269,24 @@ public RecoveryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java index 6b7b87671..dc6074e6e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java @@ -32,6 +32,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -77,6 +78,11 @@ public RepositoriesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java index 2a75522ab..69757c181 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java @@ -208,6 +208,24 @@ public SegmentsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java index 597406086..72e73aabd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java @@ -207,6 +207,24 @@ public ShardsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java index f1f152c5f..9e97811ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java @@ -211,6 +211,24 @@ public SnapshotsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.repository())) + propsSet |= _repository; + + if (propsSet == 0) { + } + if (propsSet == (_repository)) { + params.put("repository", request.repository.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java index 98404b933..d171332c8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java @@ -35,6 +35,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -246,6 +247,11 @@ public TasksRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java index f3d71ab49..5fd596da4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java @@ -161,6 +161,24 @@ public TemplatesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java index ac1305566..a74cca0d4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java @@ -206,6 +206,25 @@ public ThreadPoolRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _threadPoolPatterns = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.threadPoolPatterns())) + propsSet |= _threadPoolPatterns; + + if (propsSet == 0) { + } + if (propsSet == (_threadPoolPatterns)) { + params.put("threadPoolPatterns", + request.threadPoolPatterns.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java index c734a711a..aa26799fc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java @@ -368,6 +368,24 @@ public TransformsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + if (request.transformId() != null) + propsSet |= _transformId; + + if (propsSet == 0) { + } + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsRequest.java index 88d7f7e2f..26999c5a5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsRequest.java @@ -74,6 +74,11 @@ public CcrStatsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/DeleteAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/DeleteAutoFollowPatternRequest.java index 158fdba5e..24d91d91a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/DeleteAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/DeleteAutoFollowPatternRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeleteAutoFollowPatternRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowInfoRequest.java index ff667eb0a..24358c82f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowInfoRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -166,6 +168,21 @@ public FollowInfoRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java index 903cfe95e..7c641026b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java @@ -590,6 +590,21 @@ protected static void setupFollowRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsRequest.java index bea8a1b69..233def2c8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -166,6 +168,21 @@ public FollowStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java index 545bd5557..89300b1b5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerRequest.java @@ -38,6 +38,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -293,6 +295,21 @@ protected static void setupForgetFollowerRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/GetAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/GetAutoFollowPatternRequest.java index 82ecec4aa..80e71113c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/GetAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/GetAutoFollowPatternRequest.java @@ -35,6 +35,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -159,6 +161,24 @@ public GetAutoFollowPatternRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseAutoFollowPatternRequest.java index 083a36e0d..cd56942f3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseAutoFollowPatternRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -150,6 +152,21 @@ public PauseAutoFollowPatternRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseFollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseFollowRequest.java index d7aaa1401..0313f07ad 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseFollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PauseFollowRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -149,6 +151,21 @@ public PauseFollowRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java index c9ccf2232..db94d4bbd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/PutAutoFollowPatternRequest.java @@ -41,6 +41,7 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -802,6 +803,21 @@ protected static void setupPutAutoFollowPatternRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeAutoFollowPatternRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeAutoFollowPatternRequest.java index 6445669c1..5bd47b266 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeAutoFollowPatternRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeAutoFollowPatternRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -151,6 +153,21 @@ public ResumeAutoFollowPatternRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java index 8ba93d5d8..13ccecf9a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ResumeFollowRequest.java @@ -40,6 +40,8 @@ import java.lang.Long; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -485,6 +487,21 @@ protected static void setupResumeFollowRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/UnfollowRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/UnfollowRequest.java index 63567d9a3..f97957fd5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/UnfollowRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/UnfollowRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -147,6 +149,21 @@ public UnfollowRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java index 9d0ca948c..4fdb340a1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainRequest.java @@ -38,6 +38,7 @@ import java.lang.Boolean; import java.lang.Integer; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -329,6 +330,11 @@ protected static void setupAllocationExplainRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java index 8fb7fd909..3bc667697 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java @@ -36,7 +36,9 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -165,6 +167,22 @@ public ClusterInfoRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _target = 1 << 0; + + int propsSet = 0; + + propsSet |= _target; + + if (propsSet == (_target)) { + params.put("target", + request.target.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java index fc78f7cd1..c6336c710 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterStatsRequest.java @@ -253,6 +253,24 @@ public ClusterStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java index 3e0663ac9..bd5d10e54 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java @@ -248,6 +248,21 @@ public DeleteComponentTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java index 90aff5f7e..ff5d32272 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteVotingConfigExclusionsRequest.java @@ -36,6 +36,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -149,6 +150,11 @@ public DeleteVotingConfigExclusionsRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java index 76fcac2f4..a22ccf9e4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java @@ -239,6 +239,21 @@ public ExistsComponentTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetClusterSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetClusterSettingsRequest.java index 8dbdee211..77f24d69e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetClusterSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetClusterSettingsRequest.java @@ -35,6 +35,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -242,6 +243,11 @@ public GetClusterSettingsRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java index 9c2f62a94..7c7179e4a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java @@ -281,6 +281,24 @@ public GetComponentTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java index b8b61e2d3..06c6d8d30 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthRequest.java @@ -561,6 +561,24 @@ public HealthRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java index 3d6ef81f9..4add9d310 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksRequest.java @@ -35,6 +35,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -184,6 +185,11 @@ public PendingTasksRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java index 147f52ab1..f72882910 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PostVotingConfigExclusionsRequest.java @@ -38,6 +38,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -245,6 +246,11 @@ public PostVotingConfigExclusionsRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java index bee61d1a3..6d0f7a331 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsRequest.java @@ -40,6 +40,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -331,6 +332,11 @@ protected static void setupPutClusterSettingsRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java index 613b1a322..126549052 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java @@ -456,6 +456,21 @@ protected static void setupPutComponentTemplateRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RemoteInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RemoteInfoRequest.java index c759cc97d..3e32134a1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RemoteInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RemoteInfoRequest.java @@ -76,6 +76,11 @@ public RemoteInfoRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java index 56c01e2f8..ddfe93079 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteRequest.java @@ -40,6 +40,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -406,6 +407,11 @@ protected static void setupRerouteRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java index 55c0caa92..c0b895ba7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java @@ -489,6 +489,31 @@ public StateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_metric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_metric | _index)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index 46537b152..fe1e6a4bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -545,6 +545,24 @@ public BulkRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (request.index() != null) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java index 81573e194..423d02c83 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java @@ -183,6 +183,11 @@ protected static void setupClearScrollRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java index ba2a69a88..943f8e18d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java @@ -162,6 +162,11 @@ protected static void setupClosePointInTimeRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java index cfee22c74..2c6c92d9d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java @@ -651,6 +651,24 @@ protected static void setupCountRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java index 1cc304d4c..a985597e4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java @@ -486,6 +486,24 @@ public static JsonpDeserializer> createCrea }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index e9f0580cf..c6b2b897a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -1189,6 +1189,21 @@ protected static void setupDeleteByQueryRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index eba1ca70b..6fce6a54f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -180,6 +180,21 @@ public DeleteByQueryRethrottleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java index b0c630046..8cd658a77 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java @@ -434,6 +434,24 @@ public DeleteRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java index f32969d90..da3d6c4f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java @@ -219,6 +219,21 @@ public DeleteScriptRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java index 6f7b73e5a..b86dd3793 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java @@ -500,6 +500,24 @@ public ExistsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java index dd910da5d..fef36572e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java @@ -463,6 +463,24 @@ public ExistsSourceRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java index 36892805f..a4e54b0c5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java @@ -620,6 +620,24 @@ protected static void setupExplainRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java index 475d1b063..024c68591 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java @@ -589,6 +589,24 @@ protected static void setupFieldCapsRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java index bfeec1ef3..8b40ddae4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java @@ -501,6 +501,24 @@ public GetRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java index 2ffa65477..b5042f5e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java @@ -75,6 +75,11 @@ public GetScriptContextRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java index 34a2bae3e..3d4b9c43b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java @@ -75,6 +75,11 @@ public GetScriptLanguagesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java index ab06f493a..65d057ae2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java @@ -183,6 +183,21 @@ public GetScriptRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java index eea22029f..12cfa2aef 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java @@ -497,6 +497,24 @@ public GetSourceRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/HealthReportRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/HealthReportRequest.java index 351a94a94..bc557f369 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/HealthReportRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/HealthReportRequest.java @@ -263,6 +263,24 @@ public HealthReportRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _feature = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.feature())) + propsSet |= _feature; + + if (propsSet == 0) { + } + if (propsSet == (_feature)) { + params.put("feature", request.feature.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java index 660a4aacc..4ea3ab8f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java @@ -625,6 +625,28 @@ public static JsonpDeserializer> createIndex }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java index 56ae434fd..82863a2fc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java @@ -73,6 +73,11 @@ public InfoRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java index a1889d691..7f959eca4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java @@ -560,6 +560,21 @@ protected static void setupKnnSearchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java index be37ff98c..23298d8c8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java @@ -597,6 +597,24 @@ protected static void setupMgetRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (request.index() != null) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java index 401902958..0102bfe59 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java @@ -545,6 +545,24 @@ public MsearchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java index dab42b2aa..722f286c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java @@ -323,6 +323,24 @@ public MsearchTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java index f52598fa3..6b9a77957 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java @@ -628,6 +628,24 @@ protected static void setupMtermvectorsRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (request.index() != null) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index dbdcc963e..0a60e2767 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -336,6 +336,21 @@ public OpenPointInTimeRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java index 2764e4570..7e72b9812 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java @@ -76,6 +76,11 @@ public PingRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java index 388a5fa94..69998a95d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java @@ -318,6 +318,28 @@ protected static void setupPutScriptRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _context = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + if (request.context() != null) + propsSet |= _context; + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + if (propsSet == (_id | _context)) { + params.put("id", request.id); + params.put("context", request.context); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java index e2abd0242..660c1a146 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java @@ -451,6 +451,24 @@ protected static void setupRankEvalRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java index 572b95850..b7e3d017a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java @@ -46,6 +46,7 @@ import java.lang.Boolean; import java.lang.Float; import java.lang.Long; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -599,6 +600,11 @@ protected static void setupReindexRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index 7e2e0fa68..a957fe1d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -178,6 +178,21 @@ public ReindexRethrottleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java index 10965da64..b7c559c64 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java @@ -39,6 +39,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -292,6 +293,24 @@ protected static void setupRenderSearchTemplateRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java index 57bf4f5d2..ddd8f6834 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java @@ -242,6 +242,11 @@ protected static void setupScriptsPainlessExecuteRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java index 86cd9274e..0854bb4fc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java @@ -204,6 +204,11 @@ protected static void setupScrollRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java index 9f0407c0e..c28b4de83 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java @@ -49,6 +49,7 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -992,6 +993,33 @@ protected static void setupSearchMvtRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _field = 1 << 0; + final int _x = 1 << 1; + final int _index = 1 << 2; + final int _y = 1 << 3; + final int _zoom = 1 << 4; + + int propsSet = 0; + + propsSet |= _field; + propsSet |= _x; + propsSet |= _index; + propsSet |= _y; + propsSet |= _zoom; + + if (propsSet == (_index | _field | _zoom | _x | _y)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("field", request.field); + params.put("zoom", String.valueOf(request.zoom)); + params.put("x", String.valueOf(request.x)); + params.put("y", String.valueOf(request.y)); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java index b7469f368..2c26e6f3b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java @@ -2571,6 +2571,24 @@ protected static void setupSearchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java index 836001595..bcf0eead0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java @@ -362,6 +362,24 @@ public SearchShardsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java index 9cdc33470..4c8f997f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java @@ -664,6 +664,24 @@ protected static void setupSearchTemplateRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java index 4cd1f8854..665625707 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java @@ -42,6 +42,8 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -436,6 +438,21 @@ protected static void setupTermsEnumRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java index 291fab0b0..2e9cc837e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java @@ -681,6 +681,28 @@ protected static void setupTermvectorsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index 713383b72..a9ee3638f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -1259,6 +1259,21 @@ protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index c2f4ef043..dce0a8722 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -180,6 +180,21 @@ public UpdateByQueryRethrottleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateRequest.java index 7ea0be419..a619ce5f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateRequest.java @@ -808,6 +808,24 @@ protected static void setupUpdateRequestDeserializ }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _id = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _id; + + if (propsSet == (_index | _id)) { + params.put("index", request.index); + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java index 5091548b7..79878be5d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java @@ -245,6 +245,21 @@ public DeleteDanglingIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _indexUuid = 1 << 0; + + int propsSet = 0; + + propsSet |= _indexUuid; + + if (propsSet == (_indexUuid)) { + params.put("indexUuid", request.indexUuid); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java index 1a23cad0a..d77f63268 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java @@ -245,6 +245,21 @@ public ImportDanglingIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _indexUuid = 1 << 0; + + int propsSet = 0; + + propsSet |= _indexUuid; + + if (propsSet == (_indexUuid)) { + params.put("indexUuid", request.indexUuid); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java index 5c7ced395..c7562228f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java @@ -75,6 +75,11 @@ public ListDanglingIndicesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java index 2eb4ebc76..4acb57e2d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public DeletePolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java index be4cfed93..60bb42209 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java @@ -75,6 +75,11 @@ public EnrichStatsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java index a7b970ece..541ac4f7f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java @@ -178,6 +178,21 @@ public ExecutePolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java index 3ea06000c..67c7de99f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -173,6 +175,24 @@ public GetPolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java index bb0b9c240..d66b72551 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java @@ -38,6 +38,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -307,6 +309,21 @@ protected static void setupPutPolicyRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java index 5cefe087d..058eb564b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -153,6 +155,21 @@ public EqlDeleteRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java index de08ed595..af43a6a43 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java @@ -224,6 +224,21 @@ public EqlGetRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java index 6d47dca89..dd44482c5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java @@ -821,6 +821,21 @@ protected static void setupEqlSearchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java index da61bcb45..52ef1acff 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public GetEqlStatusRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesRequest.java index 0c94bc08a..54bf8a2ce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesRequest.java @@ -75,6 +75,11 @@ public GetFeaturesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesRequest.java index 595fd3a8a..36fa758f5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesRequest.java @@ -74,6 +74,11 @@ public ResetFeaturesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java index 8d623d8e6..cc9b133f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java @@ -2186,6 +2186,21 @@ protected static void setupFleetSearchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java index 7daaed745..cfb0047d6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java @@ -459,6 +459,21 @@ protected static void setupExploreRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/DeleteLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/DeleteLifecycleRequest.java index 879c2c2c6..b3b6c1525 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/DeleteLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/DeleteLifecycleRequest.java @@ -228,6 +228,21 @@ public DeleteLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleRequest.java index 3864d0745..9c4e5cde9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleRequest.java @@ -292,6 +292,21 @@ public ExplainLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusRequest.java index 1be621404..55e5dd66f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusRequest.java @@ -74,6 +74,11 @@ public GetIlmStatusRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetLifecycleRequest.java index 44ac11d71..31f477077 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetLifecycleRequest.java @@ -235,6 +235,24 @@ public GetLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersRequest.java index 9ebed6718..6f1057961 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersRequest.java @@ -37,6 +37,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -233,6 +234,11 @@ protected static void setupMigrateToDataTiersRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MoveToStepRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MoveToStepRequest.java index 366d4ef4e..0d02debb2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MoveToStepRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MoveToStepRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -248,6 +250,21 @@ protected static void setupMoveToStepRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/PutLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/PutLifecycleRequest.java index 5ab2a2bdd..75a0a8d25 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/PutLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/PutLifecycleRequest.java @@ -292,6 +292,21 @@ protected static void setupPutLifecycleRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyRequest.java index 4366296fc..efa1d2c85 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public RemovePolicyRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RetryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RetryRequest.java index 4aeef4981..7b1335c1a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RetryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RetryRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public RetryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StartIlmRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StartIlmRequest.java index 645be3752..eb8ce80a8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StartIlmRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StartIlmRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -166,6 +167,11 @@ public StartIlmRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StopIlmRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StopIlmRequest.java index e733ade0a..d23df9c59 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StopIlmRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/StopIlmRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -167,6 +168,11 @@ public StopIlmRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java index 6a9026a62..1a06ec1fa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java @@ -352,6 +352,24 @@ public AddBlockRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _block = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _block; + + if (propsSet == (_index | _block)) { + params.put("index", request.index); + params.put("block", request.block.jsonValue()); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AnalyzeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AnalyzeRequest.java index 37f94c937..aadb9a1f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AnalyzeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AnalyzeRequest.java @@ -42,7 +42,9 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -607,6 +609,24 @@ protected static void setupAnalyzeRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (request.index() != null) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java index a576085c2..6cd9eb820 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java @@ -421,6 +421,24 @@ public ClearCacheRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloneIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloneIndexRequest.java index e1807ec49..9ea351431 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloneIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloneIndexRequest.java @@ -440,6 +440,24 @@ protected static void setupCloneIndexRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _target = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _target; + + if (propsSet == (_index | _target)) { + params.put("index", request.index); + params.put("target", request.target); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java index 835de37f8..8f4df6b98 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java @@ -406,6 +406,21 @@ public CloseIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java index 42f1c7832..05c23df8d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -161,6 +163,21 @@ public CreateDataStreamRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java index ed3fcc3da..e6089255a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java @@ -459,6 +459,21 @@ protected static void setupCreateIndexRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsRequest.java index ea78cef1b..678a91d9b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsRequest.java @@ -207,6 +207,24 @@ public DataStreamsStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java index 42a119e41..4c9857640 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java @@ -301,6 +301,28 @@ public DeleteAliasRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + propsSet |= _name; + propsSet |= _index; + + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java index 18dc37d66..8eb914779 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java @@ -283,6 +283,21 @@ public DeleteDataLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java index 739411f14..1e5f101b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java @@ -209,6 +209,21 @@ public DeleteDataStreamRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java index ba6b244d9..6247195db 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java @@ -370,6 +370,21 @@ public DeleteIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexTemplateRequest.java index 7638cf34e..6c3516d64 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexTemplateRequest.java @@ -248,6 +248,21 @@ public DeleteIndexTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java index adbf3cf54..20971b748 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java @@ -227,6 +227,21 @@ public DeleteTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java index 7f9a7829a..c1ba4255c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java @@ -343,6 +343,21 @@ public DiskUsageRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DownsampleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DownsampleRequest.java index e24c1a262..3732c2628 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DownsampleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DownsampleRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -231,6 +233,24 @@ protected static JsonpDeserializer createDownsampleRequestDes }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _targetIndex = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + propsSet |= _targetIndex; + propsSet |= _index; + + if (propsSet == (_index | _targetIndex)) { + params.put("index", request.index); + params.put("targetIndex", request.targetIndex); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java index 1bd822176..f7da54657 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java @@ -371,6 +371,28 @@ public ExistsAliasRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + propsSet |= _name; + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java index d6bac38dc..c8600fd8d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java @@ -191,6 +191,21 @@ public ExistsIndexTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java index eab94021f..e49e82a04 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java @@ -365,6 +365,21 @@ public ExistsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsTemplateRequest.java index 48a9dc5e4..380c4ebde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsTemplateRequest.java @@ -258,6 +258,21 @@ public ExistsTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java index 15c304296..20a59a102 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java @@ -232,6 +232,21 @@ public ExplainDataLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java index 390d21901..a559e3c7d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java @@ -447,6 +447,21 @@ public FieldUsageStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java index 1e2a30c2e..ff8a34d3b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java @@ -351,6 +351,24 @@ public FlushRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java index 0f84f5dc9..598569ae7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java @@ -387,6 +387,24 @@ public ForcemergeRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java index 55b6b032a..d8b7b1f82 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java @@ -384,6 +384,34 @@ public GetAliasRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java index 615f70e07..eb009bc39 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java @@ -247,6 +247,21 @@ public GetDataLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java index 9e47ed0fc..1ba10dce6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java @@ -246,6 +246,24 @@ public GetDataStreamRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java index 753b64924..294260e42 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java @@ -402,6 +402,28 @@ public GetFieldMappingRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _fields = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + propsSet |= _fields; + + if (propsSet == (_fields)) { + params.put("fields", request.fields.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _fields)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("fields", request.fields.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java index 3d5e8fb4d..a664fdc1c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java @@ -435,6 +435,21 @@ public GetIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateRequest.java index e2ccabe8e..68a2e269f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateRequest.java @@ -281,6 +281,24 @@ public GetIndexTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java index 8372536ed..c07d5e8a3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java @@ -471,6 +471,34 @@ public GetIndicesSettingsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java index f2c3df7f0..e25b1d52a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java @@ -363,6 +363,24 @@ public GetMappingRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java index 1af53dc35..85ef8c5c5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java @@ -275,6 +275,24 @@ public GetTemplateRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java index fcfc2dd99..dcab3140b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java @@ -563,6 +563,34 @@ public IndicesStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_metric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_index | _metric)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java index 5b4d06195..a7c7d13f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -155,6 +157,21 @@ public MigrateToDataStreamRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java index 46bc7e160..f3fca2a41 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java @@ -201,6 +201,11 @@ protected static void setupModifyDataStreamRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java index 2d48b2858..019289be0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java @@ -420,6 +420,21 @@ public OpenRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamRequest.java index 7b2f955b1..1904aad99 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public PromoteDataStreamRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java index 280b2100d..da1bae0e7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java @@ -511,6 +511,28 @@ protected static void setupPutAliasRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _name = 1 << 0; + final int _index = 1 << 1; + + int propsSet = 0; + + propsSet |= _name; + propsSet |= _index; + + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name); + } + if (propsSet == (_index | _name)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java index 178a2dc94..4e38a30ba 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java @@ -379,6 +379,21 @@ protected static void setupPutDataLifecycleRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndexTemplateRequest.java index 350c62569..03d25f990 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndexTemplateRequest.java @@ -545,6 +545,21 @@ protected static void setupPutIndexTemplateRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java index 89c49a165..adf2e5d0e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java @@ -478,6 +478,24 @@ protected static JsonpDeserializer createPutIndicesSe }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java index a8c0648f1..de3f08a08 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java @@ -975,6 +975,21 @@ protected static void setupPutMappingRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java index 1a3cef3be..281ea7a6d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java @@ -600,6 +600,21 @@ protected static void setupPutTemplateRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java index a14d5a7d4..fe266416b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java @@ -232,6 +232,24 @@ public RecoveryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java index 79c99a943..a0936aa7d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java @@ -293,6 +293,24 @@ public RefreshRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java index 7d77c929c..f0a7d6509 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java @@ -267,6 +267,21 @@ public ReloadSearchAnalyzersRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java index 72243b720..02618e6b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java @@ -228,6 +228,21 @@ public ResolveIndexRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java index de3403eb7..ea5837c32 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java @@ -588,6 +588,28 @@ protected static void setupRolloverRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _newIndex = 1 << 0; + final int _alias = 1 << 1; + + int propsSet = 0; + + if (request.newIndex() != null) + propsSet |= _newIndex; + propsSet |= _alias; + + if (propsSet == (_alias)) { + params.put("alias", request.alias); + } + if (propsSet == (_alias | _newIndex)) { + params.put("alias", request.alias); + params.put("newIndex", request.newIndex); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java index 2d120ea51..9d2d3e4da 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java @@ -319,6 +319,24 @@ public SegmentsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java index b8ea5c6e4..f3ef353dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java @@ -316,6 +316,24 @@ public ShardStoresRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShrinkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShrinkRequest.java index 6be8559fe..5b8aef73e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShrinkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShrinkRequest.java @@ -438,6 +438,24 @@ protected static void setupShrinkRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _target = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _target; + + if (propsSet == (_index | _target)) { + params.put("index", request.index); + params.put("target", request.target); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java index 5182c71fd..ef4aedff7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java @@ -663,6 +663,21 @@ protected static void setupSimulateIndexTemplateRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateTemplateRequest.java index 29975804f..4bafcbf29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateTemplateRequest.java @@ -319,6 +319,24 @@ protected static JsonpDeserializer createSimulateTempla }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (request.name() != null) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java index 69f664710..a7c3fcf18 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java @@ -438,6 +438,24 @@ protected static void setupSplitRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + final int _target = 1 << 1; + + int propsSet = 0; + + propsSet |= _index; + propsSet |= _target; + + if (propsSet == (_index | _target)) { + params.put("index", request.index); + params.put("target", request.target); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UnfreezeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UnfreezeRequest.java index 2d8985c9f..f577645f9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UnfreezeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UnfreezeRequest.java @@ -374,6 +374,21 @@ public UnfreezeRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java index 481d13657..3702a9217 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java @@ -38,6 +38,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -279,6 +280,11 @@ protected static void setupUpdateAliasesRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java index 8a6c38380..ab53caf1f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java @@ -627,6 +627,24 @@ protected static void setupValidateQueryRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java index 5de14ec61..ce3c5baa2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java @@ -220,6 +220,21 @@ public DeletePipelineRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java index 0a57969a4..c6868e514 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java @@ -74,6 +74,11 @@ public GeoIpStatsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java index 3032a1e1b..a2c89ad61 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java @@ -221,6 +221,24 @@ public GetPipelineRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java index 1974a400e..cb6479acc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java @@ -74,6 +74,11 @@ public ProcessorGrokRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java index af6ab38bb..8e27524a9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java @@ -555,6 +555,21 @@ protected static void setupPutPipelineRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java index 2df942355..abe26484d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java @@ -305,6 +305,24 @@ protected static void setupSimulateRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/DeleteLicenseRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/DeleteLicenseRequest.java index 4450214c5..8b7e16e61 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/DeleteLicenseRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/DeleteLicenseRequest.java @@ -74,6 +74,11 @@ public DeleteLicenseRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetBasicStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetBasicStatusRequest.java index 72699c60a..0ff846e85 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetBasicStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetBasicStatusRequest.java @@ -75,6 +75,11 @@ public GetBasicStatusRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java index 9e028a449..c9435eacc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -183,6 +184,11 @@ public GetLicenseRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetTrialStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetTrialStatusRequest.java index 1f6a87440..7cc79b78d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetTrialStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/GetTrialStatusRequest.java @@ -75,6 +75,11 @@ public GetTrialStatusRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostRequest.java index d34327d64..4d443b1c9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostRequest.java @@ -37,6 +37,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -261,6 +262,11 @@ protected static void setupPostRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartBasicRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartBasicRequest.java index f41723780..216f2efd6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartBasicRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartBasicRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -143,6 +144,11 @@ public PostStartBasicRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartTrialRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartTrialRequest.java index 0bac2ed65..fdeb8ccb7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartTrialRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/license/PostStartTrialRequest.java @@ -35,6 +35,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -161,6 +162,11 @@ public PostStartTrialRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/DeletePipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/DeletePipelineRequest.java index 3fc0e7a71..24708dc48 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/DeletePipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/DeletePipelineRequest.java @@ -38,6 +38,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -149,6 +151,21 @@ public DeletePipelineRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java index 8869ac543..bb5cfcf38 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/GetPipelineRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -168,6 +170,23 @@ public GetPipelineRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java index b0b3d340a..ed6d1939c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java @@ -41,6 +41,8 @@ import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -203,6 +205,21 @@ protected static JsonpDeserializer createPutPipelineRequestD }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsRequest.java index ada4a88c6..542d21304 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsRequest.java @@ -35,6 +35,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -159,6 +161,24 @@ public DeprecationsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (request.index() != null) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/GetFeatureUpgradeStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/GetFeatureUpgradeStatusRequest.java index ef2343ee0..35cd11e08 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/GetFeatureUpgradeStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/GetFeatureUpgradeStatusRequest.java @@ -75,6 +75,11 @@ public GetFeatureUpgradeStatusRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/PostFeatureUpgradeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/PostFeatureUpgradeRequest.java index 2ca799f29..c08097b72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/PostFeatureUpgradeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/PostFeatureUpgradeRequest.java @@ -75,6 +75,11 @@ public PostFeatureUpgradeRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ClearTrainedModelDeploymentCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ClearTrainedModelDeploymentCacheRequest.java index 3bece35fd..ed58711d3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ClearTrainedModelDeploymentCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ClearTrainedModelDeploymentCacheRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -155,6 +157,21 @@ public ClearTrainedModelDeploymentCacheRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/CloseJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/CloseJobRequest.java index be7d40bb9..0f61f2f21 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/CloseJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/CloseJobRequest.java @@ -40,6 +40,8 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -307,6 +309,21 @@ protected static void setupCloseJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java index 7745c5af5..5a998f2bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -176,6 +178,24 @@ public DeleteCalendarEventRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _eventId = 1 << 0; + final int _calendarId = 1 << 1; + + int propsSet = 0; + + propsSet |= _eventId; + propsSet |= _calendarId; + + if (propsSet == (_calendarId | _eventId)) { + params.put("calendarId", request.calendarId); + params.put("eventId", request.eventId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java index aebf4dc7b..62fffa7a3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -194,6 +196,24 @@ public DeleteCalendarJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _calendarId; + propsSet |= _jobId; + + if (propsSet == (_calendarId | _jobId)) { + params.put("calendarId", request.calendarId); + params.put("jobId", request.jobId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java index e9094e81f..ed34ebe87 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public DeleteCalendarRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + + int propsSet = 0; + + propsSet |= _calendarId; + + if (propsSet == (_calendarId)) { + params.put("calendarId", request.calendarId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java index 11a043a3e..6a7553822 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java @@ -217,6 +217,21 @@ public DeleteDataFrameAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java index 017f73a24..42a2c6eec 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java @@ -183,6 +183,21 @@ public DeleteDatafeedRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteExpiredDataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteExpiredDataRequest.java index 58415c87c..035603dcf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteExpiredDataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteExpiredDataRequest.java @@ -39,6 +39,8 @@ import java.lang.Float; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -273,6 +275,24 @@ protected static void setupDeleteExpiredDataRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + if (request.jobId() != null) + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java index f9d3d550c..60fed8a2c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeleteFilterRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _filterId = 1 << 0; + + int propsSet = 0; + + propsSet |= _filterId; + + if (propsSet == (_filterId)) { + params.put("filterId", request.filterId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteForecastRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteForecastRequest.java index 100572c84..1a5e66fe3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteForecastRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteForecastRequest.java @@ -271,6 +271,28 @@ public DeleteForecastRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + final int _forecastId = 1 << 1; + + int propsSet = 0; + + propsSet |= _jobId; + if (request.forecastId() != null) + propsSet |= _forecastId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + if (propsSet == (_jobId | _forecastId)) { + params.put("jobId", request.jobId); + params.put("forecastId", request.forecastId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteJobRequest.java index af5fabf3a..ca1786d55 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteJobRequest.java @@ -242,6 +242,21 @@ public DeleteJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteModelSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteModelSnapshotRequest.java index c9a122739..ba98ef6e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteModelSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteModelSnapshotRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -179,6 +181,24 @@ public DeleteModelSnapshotRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java index 551d07626..8064542b0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -180,6 +182,24 @@ public DeleteTrainedModelAliasRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelAlias = 1 << 0; + final int _modelId = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelAlias; + propsSet |= _modelId; + + if (propsSet == (_modelId | _modelAlias)) { + params.put("modelId", request.modelId); + params.put("modelAlias", request.modelAlias); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java index ef98f1d9f..eb9ef1b77 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java @@ -178,6 +178,21 @@ public DeleteTrainedModelRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java index 875f4463f..61219b96e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java @@ -326,6 +326,11 @@ protected static void setupEstimateModelMemoryRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java index ad9703856..b10266148 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java @@ -252,6 +252,11 @@ protected static void setupEvaluateDataFrameRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ExplainDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ExplainDataFrameAnalyticsRequest.java index 614bd74c5..8b16e4415 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ExplainDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ExplainDataFrameAnalyticsRequest.java @@ -39,6 +39,8 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -549,6 +551,24 @@ protected static void setupExplainDataFrameAnalyticsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java index 518570bd0..12ff8c216 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java @@ -40,6 +40,8 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -344,6 +346,21 @@ protected static void setupFlushJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ForecastRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ForecastRequest.java index af3c013d3..e506b8095 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ForecastRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ForecastRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -301,6 +303,21 @@ protected static void setupForecastRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetBucketsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetBucketsRequest.java index e472c97c1..43dbfda72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetBucketsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetBucketsRequest.java @@ -548,6 +548,28 @@ protected static void setupGetBucketsRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + final int _timestamp = 1 << 1; + + int propsSet = 0; + + propsSet |= _jobId; + if (request.timestamp() != null) + propsSet |= _timestamp; + + if (propsSet == (_jobId | _timestamp)) { + params.put("jobId", request.jobId); + params.put("timestamp", request.timestamp.toString()); + } + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java index 763675322..351d28a69 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java @@ -295,6 +295,21 @@ public GetCalendarEventsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + + int propsSet = 0; + + propsSet |= _calendarId; + + if (propsSet == (_calendarId)) { + params.put("calendarId", request.calendarId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java index 58b275bd6..1ced7cd12 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java @@ -292,6 +292,24 @@ protected static void setupGetCalendarsRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + + int propsSet = 0; + + if (request.calendarId() != null) + propsSet |= _calendarId; + + if (propsSet == 0) { + } + if (propsSet == (_calendarId)) { + params.put("calendarId", request.calendarId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCategoriesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCategoriesRequest.java index 7cccc36c9..e6be6d429 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCategoriesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetCategoriesRequest.java @@ -346,6 +346,28 @@ protected static void setupGetCategoriesRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _categoryId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + if (request.categoryId() != null) + propsSet |= _categoryId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _categoryId)) { + params.put("jobId", request.jobId); + params.put("categoryId", request.categoryId); + } + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java index bc0125126..d938e0c15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java @@ -304,6 +304,24 @@ public GetDataFrameAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java index 45c51f2d8..7759f6b40 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java @@ -300,6 +300,24 @@ public GetDataFrameAnalyticsStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java index 05309c5b4..6c130972b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java @@ -239,6 +239,24 @@ public GetDatafeedStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.datafeedId())) + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java index d97aff4e8..f98aa3f52 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java @@ -266,6 +266,24 @@ public GetDatafeedsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.datafeedId())) + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java index 33fa747cd..c06c6696e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java @@ -227,6 +227,24 @@ public GetFiltersRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _filterId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.filterId())) + propsSet |= _filterId; + + if (propsSet == 0) { + } + if (propsSet == (_filterId)) { + params.put("filterId", request.filterId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetInfluencersRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetInfluencersRequest.java index 69b56194e..9504a7d1e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetInfluencersRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetInfluencersRequest.java @@ -445,6 +445,21 @@ protected static void setupGetInfluencersRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java index a4849113f..c1db35a63 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java @@ -212,6 +212,24 @@ public GetJobStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + if (request.jobId() != null) + propsSet |= _jobId; + + if (propsSet == 0) { + } + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java index dbe480c99..c2dc94b5e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java @@ -261,6 +261,24 @@ public GetJobsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.jobId())) + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetMemoryStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetMemoryStatsRequest.java index 35e52da8f..0d38c308c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetMemoryStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetMemoryStatsRequest.java @@ -273,6 +273,24 @@ public GetMemoryStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (request.nodeId() != null) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotUpgradeStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotUpgradeStatsRequest.java index cf6beafb6..7bc519570 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotUpgradeStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotUpgradeStatsRequest.java @@ -237,6 +237,24 @@ public GetModelSnapshotUpgradeStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotsRequest.java index 73964a9bb..e4acac23c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetModelSnapshotsRequest.java @@ -450,6 +450,28 @@ protected static void setupGetModelSnapshotsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + if (request.snapshotId() != null) + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java index f823622d7..3b120fcfe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java @@ -42,6 +42,8 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -450,6 +452,21 @@ protected static void setupGetOverallBucketsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetRecordsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetRecordsRequest.java index d9a06a791..50af47362 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetRecordsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetRecordsRequest.java @@ -478,6 +478,21 @@ protected static void setupGetRecordsRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java index 77335e217..97d445206 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java @@ -373,6 +373,24 @@ public GetTrainedModelsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + if (request.modelId() != null) + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java index fc4b672c1..e5a763456 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java @@ -279,6 +279,24 @@ public GetTrainedModelsStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.modelId())) + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java index b584b9252..a4ca08ce2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java @@ -338,6 +338,24 @@ protected static void setupInferTrainedModelRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/MlInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/MlInfoRequest.java index a2a653ad8..77c97f954 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/MlInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/MlInfoRequest.java @@ -79,6 +79,11 @@ public MlInfoRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java index 5fa4c57be..ad701401d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -222,6 +224,21 @@ protected static void setupOpenJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java index d3840ba6a..2d31c7a29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -246,6 +248,21 @@ protected static void setupPostCalendarEventsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + + int propsSet = 0; + + propsSet |= _calendarId; + + if (propsSet == (_calendarId)) { + params.put("calendarId", request.calendarId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostDataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostDataRequest.java index bc552b5dd..751ed3097 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostDataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PostDataRequest.java @@ -309,6 +309,21 @@ public static JsonpDeserializer> createPostDataRe }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java index 1d2b455b9..774d5bad6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java @@ -38,6 +38,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -241,6 +243,24 @@ protected static void setupPreviewDataFrameAnalyticsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == 0) { + } + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java index dc414937f..989897f6d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java @@ -362,6 +362,24 @@ protected static void setupPreviewDatafeedRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + if (request.datafeedId() != null) + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java index 225a4b971..b9f07a0af 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -177,6 +179,24 @@ public PutCalendarJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _calendarId; + propsSet |= _jobId; + + if (propsSet == (_calendarId | _jobId)) { + params.put("calendarId", request.calendarId); + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java index 9117e4010..139e8db3f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -259,6 +261,21 @@ protected static void setupPutCalendarRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _calendarId = 1 << 0; + + int propsSet = 0; + + propsSet |= _calendarId; + + if (propsSet == (_calendarId)) { + params.put("calendarId", request.calendarId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java index cd7943e95..d87ae33d2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java @@ -40,6 +40,7 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -679,6 +680,21 @@ protected static void setupPutDataFrameAnalyticsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java index e13726a32..efbef6de4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java @@ -1087,6 +1087,21 @@ protected static void setupPutDatafeedRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java index 288ab02ee..394d7583c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -267,6 +269,21 @@ protected static void setupPutFilterRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _filterId = 1 << 0; + + int propsSet = 0; + + propsSet |= _filterId; + + if (propsSet == (_filterId)) { + params.put("filterId", request.filterId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java index b5180aa98..56634f7a9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java @@ -42,7 +42,9 @@ import java.lang.Long; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -872,6 +874,21 @@ protected static void setupPutJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java index 7476ce6f3..fb698b6a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java @@ -221,6 +221,24 @@ public PutTrainedModelAliasRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelAlias = 1 << 0; + final int _modelId = 1 << 1; + + int propsSet = 0; + + propsSet |= _modelAlias; + propsSet |= _modelId; + + if (propsSet == (_modelId | _modelAlias)) { + params.put("modelId", request.modelId); + params.put("modelAlias", request.modelAlias); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java index 26a4fb285..30b451df0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java @@ -40,6 +40,8 @@ import java.lang.Long; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -306,6 +308,24 @@ protected static void setupPutTrainedModelDefinitionPartRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _part = 1 << 0; + final int _modelId = 1 << 1; + + int propsSet = 0; + + propsSet |= _part; + propsSet |= _modelId; + + if (propsSet == (_modelId | _part)) { + params.put("modelId", request.modelId); + params.put("part", String.valueOf(request.part)); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java index 89366846c..392cb7db9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java @@ -576,6 +576,21 @@ protected static void setupPutTrainedModelRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java index d1e8aa854..437abb717 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -283,6 +285,21 @@ protected static void setupPutTrainedModelVocabularyRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java index aae92a3e0..e99774ddb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java @@ -206,6 +206,21 @@ public ResetJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/RevertModelSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/RevertModelSnapshotRequest.java index e9d7694f3..1878d07c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/RevertModelSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/RevertModelSnapshotRequest.java @@ -39,6 +39,8 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -255,6 +257,24 @@ protected static void setupRevertModelSnapshotRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/SetUpgradeModeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/SetUpgradeModeRequest.java index 1693a7994..787fdb5e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/SetUpgradeModeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/SetUpgradeModeRequest.java @@ -35,6 +35,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -186,6 +187,11 @@ public SetUpgradeModeRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java index 9a25986e8..e9b1a237e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java @@ -205,6 +205,21 @@ public StartDataFrameAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java index 0d163e4be..047155d0f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java @@ -40,6 +40,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -306,6 +308,21 @@ protected static void setupStartDatafeedRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java index be0e9d8ca..fea7d41ac 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java @@ -384,6 +384,21 @@ public StartTrainedModelDeploymentRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDataFrameAnalyticsRequest.java index 39763ec88..738f4acce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDataFrameAnalyticsRequest.java @@ -272,6 +272,21 @@ public StopDataFrameAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java index 1d3748114..347d3de4d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java @@ -40,6 +40,8 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -294,6 +296,21 @@ protected static void setupStopDatafeedRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java index e9d062770..e0e8d4cc0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java @@ -220,6 +220,21 @@ public StopTrainedModelDeploymentRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _modelId = 1 << 0; + + int propsSet = 0; + + propsSet |= _modelId; + + if (propsSet == (_modelId)) { + params.put("modelId", request.modelId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java index 598d041fe..a3e2238bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java @@ -40,6 +40,8 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -334,6 +336,21 @@ protected static void setupUpdateDataFrameAnalyticsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java index 9562c32c6..2c4268a2b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java @@ -1076,6 +1076,21 @@ protected static void setupUpdateDatafeedRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _datafeedId = 1 << 0; + + int propsSet = 0; + + propsSet |= _datafeedId; + + if (propsSet == (_datafeedId)) { + params.put("datafeedId", request.datafeedId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java index 015f8a3cb..dc989c388 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -313,6 +315,21 @@ protected static void setupUpdateFilterRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _filterId = 1 << 0; + + int propsSet = 0; + + propsSet |= _filterId; + + if (propsSet == (_filterId)) { + params.put("filterId", request.filterId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java index 06f6ce928..d43d3848d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java @@ -42,6 +42,7 @@ import java.lang.Long; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -855,6 +856,21 @@ protected static void setupUpdateJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _jobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _jobId; + + if (propsSet == (_jobId)) { + params.put("jobId", request.jobId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateModelSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateModelSnapshotRequest.java index c586821cf..06ce5b071 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateModelSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateModelSnapshotRequest.java @@ -39,6 +39,8 @@ import java.lang.Boolean; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -278,6 +280,24 @@ protected static void setupUpdateModelSnapshotRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpgradeJobSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpgradeJobSnapshotRequest.java index 3a0c56e4c..f1764e56e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpgradeJobSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpgradeJobSnapshotRequest.java @@ -253,6 +253,24 @@ public UpgradeJobSnapshotRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _snapshotId = 1 << 0; + final int _jobId = 1 << 1; + + int propsSet = 0; + + propsSet |= _snapshotId; + propsSet |= _jobId; + + if (propsSet == (_jobId | _snapshotId)) { + params.put("jobId", request.jobId); + params.put("snapshotId", request.snapshotId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateDetectorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateDetectorRequest.java index c642a82f9..391dbaa3d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateDetectorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateDetectorRequest.java @@ -162,6 +162,11 @@ protected static JsonpDeserializer createValidateDetect }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateRequest.java index 906b082e6..29d735a18 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ValidateRequest.java @@ -425,6 +425,11 @@ protected static void setupValidateRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java index bc0487372..c2f2e29df 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java @@ -307,6 +307,24 @@ public BulkRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _type = 1 << 0; + + int propsSet = 0; + + if (request.type() != null) + propsSet |= _type; + + if (propsSet == 0) { + } + if (propsSet == (_type)) { + params.put("type", request.type); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ClearRepositoriesMeteringArchiveRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ClearRepositoriesMeteringArchiveRequest.java index 048050b68..c1645c560 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ClearRepositoriesMeteringArchiveRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ClearRepositoriesMeteringArchiveRequest.java @@ -37,7 +37,9 @@ import java.lang.Long; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -205,6 +207,24 @@ public ClearRepositoriesMeteringArchiveRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _maxArchiveVersion = 1 << 0; + final int _nodeId = 1 << 1; + + int propsSet = 0; + + propsSet |= _maxArchiveVersion; + propsSet |= _nodeId; + + if (propsSet == (_nodeId | _maxArchiveVersion)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("maxArchiveVersion", String.valueOf(request.maxArchiveVersion)); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/GetRepositoriesMeteringInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/GetRepositoriesMeteringInfoRequest.java index e14383d9e..fd2c6ba69 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/GetRepositoriesMeteringInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/GetRepositoriesMeteringInfoRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -176,6 +178,21 @@ public GetRepositoriesMeteringInfoRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + propsSet |= _nodeId; + + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/HotThreadsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/HotThreadsRequest.java index 26bd45f8d..9d4635a21 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/HotThreadsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/HotThreadsRequest.java @@ -429,6 +429,24 @@ public HotThreadsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesInfoRequest.java index 98a334550..508de3ca2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesInfoRequest.java @@ -341,6 +341,34 @@ public NodesInfoRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + final int _nodeId = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_metric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_nodeId | _metric)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesStatsRequest.java index e5a41190a..454f33c78 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesStatsRequest.java @@ -667,6 +667,48 @@ public NodesStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + final int _indexMetric = 1 << 1; + final int _nodeId = 1 << 2; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + if (ApiTypeHelper.isDefined(request.indexMetric())) + propsSet |= _indexMetric; + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_metric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_nodeId | _metric)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_metric | _indexMetric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("indexMetric", + request.indexMetric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_nodeId | _metric | _indexMetric)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("indexMetric", + request.indexMetric.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesUsageRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesUsageRequest.java index 13d425e55..30017aa2f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesUsageRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/NodesUsageRequest.java @@ -278,6 +278,34 @@ public NodesUsageRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + final int _nodeId = 1 << 1; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_metric)) { + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == (_nodeId | _metric)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + params.put("metric", request.metric.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ReloadSecureSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ReloadSecureSettingsRequest.java index 0f93807f2..965b8ddaa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ReloadSecureSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/ReloadSecureSettingsRequest.java @@ -272,6 +272,24 @@ protected static void setupReloadSecureSettingsRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/DeleteQueryRulesetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/DeleteQueryRulesetRequest.java index 97fa96632..7670af893 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/DeleteQueryRulesetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/DeleteQueryRulesetRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -145,6 +147,21 @@ public DeleteQueryRulesetRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _rulesetId = 1 << 0; + + int propsSet = 0; + + propsSet |= _rulesetId; + + if (propsSet == (_rulesetId)) { + params.put("rulesetId", request.rulesetId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/GetQueryRulesetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/GetQueryRulesetRequest.java index 74312a2e8..b510f576d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/GetQueryRulesetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/GetQueryRulesetRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -145,6 +147,21 @@ public GetQueryRulesetRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _rulesetId = 1 << 0; + + int propsSet = 0; + + propsSet |= _rulesetId; + + if (propsSet == (_rulesetId)) { + params.put("rulesetId", request.rulesetId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/ListRequest.java index 745566a89..f7a555a96 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/ListRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -160,6 +161,11 @@ public ListRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java index a7c82781e..9925d24b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_ruleset/PutRequest.java @@ -39,6 +39,8 @@ import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -200,6 +202,21 @@ protected static JsonpDeserializer createPutRequestDeserializer() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _rulesetId = 1 << 0; + + int propsSet = 0; + + propsSet |= _rulesetId; + + if (propsSet == (_rulesetId)) { + params.put("rulesetId", request.rulesetId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/DeleteJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/DeleteJobRequest.java index 4c7106606..6132b5da4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/DeleteJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/DeleteJobRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public DeleteJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetJobsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetJobsRequest.java index b64a0c45a..fe7695819 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetJobsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetJobsRequest.java @@ -35,6 +35,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -155,6 +157,24 @@ public GetJobsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupCapsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupCapsRequest.java index 771a253d9..23759ed95 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupCapsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupCapsRequest.java @@ -35,6 +35,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -158,6 +160,24 @@ public GetRollupCapsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupIndexCapsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupIndexCapsRequest.java index 0873337f4..11630b7ce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupIndexCapsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/GetRollupIndexCapsRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -167,6 +169,21 @@ public GetRollupIndexCapsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/PutJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/PutJobRequest.java index 462bac5ee..26e25502b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/PutJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/PutJobRequest.java @@ -40,6 +40,7 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -557,6 +558,21 @@ protected static void setupPutJobRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/RollupSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/RollupSearchRequest.java index 05a70547f..7732dae59 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/RollupSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/RollupSearchRequest.java @@ -41,6 +41,7 @@ import java.lang.Integer; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -321,6 +322,21 @@ protected static void setupRollupSearchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + propsSet |= _index; + + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StartJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StartJobRequest.java index f733b25d1..47f9be989 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StartJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StartJobRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -145,6 +147,21 @@ public StartJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StopJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StopJobRequest.java index 5c946e077..7a9f780e0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StopJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/rollup/StopJobRequest.java @@ -216,6 +216,21 @@ public StopJobRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteBehavioralAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteBehavioralAnalyticsRequest.java index 4014560a7..f22e337b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteBehavioralAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteBehavioralAnalyticsRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeleteBehavioralAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteSearchApplicationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteSearchApplicationRequest.java index e3eceecba..b5515a8ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteSearchApplicationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/DeleteSearchApplicationRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeleteSearchApplicationRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetBehavioralAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetBehavioralAnalyticsRequest.java index b2aa3e9bf..067ca4a6a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetBehavioralAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetBehavioralAnalyticsRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -171,6 +173,24 @@ public GetBehavioralAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetSearchApplicationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetSearchApplicationRequest.java index 9a617546d..352e4551f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetSearchApplicationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/GetSearchApplicationRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public GetSearchApplicationRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java index 0f1578953..13f63afca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/ListRequest.java @@ -35,6 +35,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -188,6 +189,11 @@ public ListRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java index bccdedcd7..08f2ff35b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutBehavioralAnalyticsRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -147,6 +149,21 @@ public PutBehavioralAnalyticsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java index 478d1d9b0..9f89595fa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/PutRequest.java @@ -231,6 +231,21 @@ protected static JsonpDeserializer createPutRequestDeserializer() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java index 0332cd4b0..17923d133 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/search_application/SearchApplicationSearchRequest.java @@ -39,6 +39,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -226,6 +227,21 @@ protected static void setupSearchApplicationSearchRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/CacheStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/CacheStatsRequest.java index 6fa7cb4c2..d7e2f3a7d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/CacheStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/CacheStatsRequest.java @@ -212,6 +212,24 @@ public CacheStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java index 857994a34..dfbad3898 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java @@ -324,6 +324,24 @@ public ClearCacheRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/MountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/MountRequest.java index 37088951a..13eef2d84 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/MountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/MountRequest.java @@ -445,6 +445,24 @@ protected static void setupMountRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/SearchableSnapshotsStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/SearchableSnapshotsStatsRequest.java index e5239a6ac..01cc1e9fe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/SearchableSnapshotsStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/SearchableSnapshotsStatsRequest.java @@ -200,6 +200,24 @@ public SearchableSnapshotsStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _index = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.index())) + propsSet |= _index; + + if (propsSet == 0) { + } + if (propsSet == (_index)) { + params.put("index", request.index.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ActivateUserProfileRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ActivateUserProfileRequest.java index 53c570996..37b725dcc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ActivateUserProfileRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ActivateUserProfileRequest.java @@ -249,6 +249,11 @@ protected static void setupActivateUserProfileRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java index 2b2456852..ca9a05186 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java @@ -79,6 +79,11 @@ public AuthenticateRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ChangePasswordRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ChangePasswordRequest.java index 5e1c1b418..a6273dd49 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ChangePasswordRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ChangePasswordRequest.java @@ -296,6 +296,24 @@ protected static void setupChangePasswordRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + if (request.username() != null) + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearApiKeyCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearApiKeyCacheRequest.java index 950268ee3..56f69b4e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearApiKeyCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearApiKeyCacheRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -171,6 +173,21 @@ public ClearApiKeyCacheRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _ids = 1 << 0; + + int propsSet = 0; + + propsSet |= _ids; + + if (propsSet == (_ids)) { + params.put("ids", request.ids.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedPrivilegesRequest.java index f04977bde..8f48ce180 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedPrivilegesRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public ClearCachedPrivilegesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _application = 1 << 0; + + int propsSet = 0; + + propsSet |= _application; + + if (propsSet == (_application)) { + params.put("application", request.application); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRealmsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRealmsRequest.java index 767883db4..0f36721a8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRealmsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRealmsRequest.java @@ -206,6 +206,21 @@ public ClearCachedRealmsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _realms = 1 << 0; + + int propsSet = 0; + + propsSet |= _realms; + + if (propsSet == (_realms)) { + params.put("realms", request.realms.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRolesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRolesRequest.java index ecf136343..61ccedfbd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRolesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedRolesRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -164,6 +166,21 @@ public ClearCachedRolesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedServiceTokensRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedServiceTokensRequest.java index b3f9a4868..c0b508e22 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedServiceTokensRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClearCachedServiceTokensRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -223,6 +225,27 @@ public ClearCachedServiceTokensRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _service = 1 << 0; + final int _namespace = 1 << 1; + final int _name = 1 << 2; + + int propsSet = 0; + + propsSet |= _service; + propsSet |= _namespace; + propsSet |= _name; + + if (propsSet == (_namespace | _service | _name)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java index 0751a66e8..0a5cb5dd1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java @@ -40,6 +40,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -402,6 +403,11 @@ protected static void setupCreateApiKeyRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java index 930c7fef9..0416b6cb4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java @@ -272,6 +272,32 @@ public CreateServiceTokenRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _service = 1 << 0; + final int _namespace = 1 << 1; + final int _name = 1 << 2; + + int propsSet = 0; + + propsSet |= _service; + propsSet |= _namespace; + if (request.name() != null) + propsSet |= _name; + + if (propsSet == (_namespace | _service | _name)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + params.put("name", request.name); + } + if (propsSet == (_namespace | _service)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeletePrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeletePrivilegesRequest.java index 286532445..d0994affe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeletePrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeletePrivilegesRequest.java @@ -226,6 +226,24 @@ public DeletePrivilegesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _application = 1 << 0; + final int _name = 1 << 1; + + int propsSet = 0; + + propsSet |= _application; + propsSet |= _name; + + if (propsSet == (_application | _name)) { + params.put("application", request.application); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleMappingRequest.java index 2fd83ce3b..59c5bf954 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleMappingRequest.java @@ -182,6 +182,21 @@ public DeleteRoleMappingRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleRequest.java index 4e81e5764..4e8ee4925 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteRoleRequest.java @@ -181,6 +181,21 @@ public DeleteRoleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java index e8e24aecc..4f3381ed3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java @@ -240,6 +240,27 @@ public DeleteServiceTokenRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _service = 1 << 0; + final int _namespace = 1 << 1; + final int _name = 1 << 2; + + int propsSet = 0; + + propsSet |= _service; + propsSet |= _namespace; + propsSet |= _name; + + if (propsSet == (_namespace | _service | _name)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteUserRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteUserRequest.java index 900fd86e6..8f7fbf2a1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteUserRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteUserRequest.java @@ -181,6 +181,21 @@ public DeleteUserRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserProfileRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserProfileRequest.java index 004d1f782..cfdc044f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserProfileRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserProfileRequest.java @@ -181,6 +181,21 @@ public DisableUserProfileRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _uid = 1 << 0; + + int propsSet = 0; + + propsSet |= _uid; + + if (propsSet == (_uid)) { + params.put("uid", request.uid); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserRequest.java index 1670345de..96a924995 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DisableUserRequest.java @@ -182,6 +182,21 @@ public DisableUserRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserProfileRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserProfileRequest.java index 1ac51a0b0..990c38ece 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserProfileRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserProfileRequest.java @@ -181,6 +181,21 @@ public EnableUserProfileRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _uid = 1 << 0; + + int propsSet = 0; + + propsSet |= _uid; + + if (propsSet == (_uid)) { + params.put("uid", request.uid); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserRequest.java index 2884f5b85..3af25c0fa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnableUserRequest.java @@ -182,6 +182,21 @@ public EnableUserRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollKibanaRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollKibanaRequest.java index 70a0f8afb..4b9769cde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollKibanaRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollKibanaRequest.java @@ -75,6 +75,11 @@ public EnrollKibanaRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollNodeRequest.java index 634deb905..9f3be6dca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/EnrollNodeRequest.java @@ -74,6 +74,11 @@ public EnrollNodeRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java index 649473e40..56e60e2d4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetApiKeyRequest.java @@ -35,6 +35,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -300,6 +301,11 @@ public GetApiKeyRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesRequest.java index ebd2dd833..57799108a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesRequest.java @@ -76,6 +76,11 @@ public GetBuiltinPrivilegesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetPrivilegesRequest.java index 415eafb65..0fbd3ee90 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetPrivilegesRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -210,6 +212,31 @@ public GetPrivilegesRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _application = 1 << 0; + final int _name = 1 << 1; + + int propsSet = 0; + + if (request.application() != null) + propsSet |= _application; + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_application)) { + params.put("application", request.application); + } + if (propsSet == (_application | _name)) { + params.put("application", request.application); + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleMappingRequest.java index 0616449f2..7ff0ae9f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleMappingRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -183,6 +185,24 @@ public GetRoleMappingRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java index 25d08bde8..e94a4dad0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -176,6 +178,24 @@ public GetRoleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceAccountsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceAccountsRequest.java index ddf4a1a5f..5ccf14f1e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceAccountsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceAccountsRequest.java @@ -35,6 +35,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -203,6 +205,31 @@ public GetServiceAccountsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _service = 1 << 0; + final int _namespace = 1 << 1; + + int propsSet = 0; + + if (request.service() != null) + propsSet |= _service; + if (request.namespace() != null) + propsSet |= _namespace; + + if (propsSet == (_namespace | _service)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + } + if (propsSet == (_namespace)) { + params.put("namespace", request.namespace); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceCredentialsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceCredentialsRequest.java index 4c52e306f..1e672e81a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceCredentialsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetServiceCredentialsRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -176,6 +178,24 @@ public GetServiceCredentialsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _service = 1 << 0; + final int _namespace = 1 << 1; + + int propsSet = 0; + + propsSet |= _service; + propsSet |= _namespace; + + if (propsSet == (_namespace | _service)) { + params.put("namespace", request.namespace); + params.put("service", request.service); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetTokenRequest.java index 14eb21db7..cc36998a6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetTokenRequest.java @@ -308,6 +308,11 @@ protected static void setupGetTokenRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserPrivilegesRequest.java index 9562b58e9..f6de89f65 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserPrivilegesRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -192,6 +193,11 @@ public GetUserPrivilegesRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserProfileRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserProfileRequest.java index aec1d5c3f..0d898b72d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserProfileRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserProfileRequest.java @@ -212,6 +212,21 @@ public GetUserProfileRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _uid = 1 << 0; + + int propsSet = 0; + + propsSet |= _uid; + + if (propsSet == (_uid)) { + params.put("uid", request.uid.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserRequest.java index 74ed8f87d..9fde87b2e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetUserRequest.java @@ -204,6 +204,24 @@ public GetUserRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.username())) + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GrantApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GrantApiKeyRequest.java index e96be5bb6..7604f224b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GrantApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GrantApiKeyRequest.java @@ -364,6 +364,11 @@ protected static void setupGrantApiKeyRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesRequest.java index f1e5247ae..3c84c04c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesRequest.java @@ -40,7 +40,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -349,6 +351,24 @@ protected static void setupHasPrivilegesRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _user = 1 << 0; + + int propsSet = 0; + + if (request.user() != null) + propsSet |= _user; + + if (propsSet == 0) { + } + if (propsSet == (_user)) { + params.put("user", request.user); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesUserProfileRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesUserProfileRequest.java index 7bc5613dd..f905f71ec 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesUserProfileRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/HasPrivilegesUserProfileRequest.java @@ -226,6 +226,11 @@ protected static void setupHasPrivilegesUserProfileRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateApiKeyRequest.java index 7f065fe4d..10de48a67 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateApiKeyRequest.java @@ -382,6 +382,11 @@ protected static void setupInvalidateApiKeyRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateTokenRequest.java index 498bae584..af7351cf8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/InvalidateTokenRequest.java @@ -254,6 +254,11 @@ protected static void setupInvalidateTokenRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutPrivilegesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutPrivilegesRequest.java index ca0d6452b..09babc723 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutPrivilegesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutPrivilegesRequest.java @@ -40,6 +40,7 @@ import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -228,6 +229,11 @@ protected static JsonpDeserializer createPutPrivilegesRequ }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java index 6194febc6..290277e03 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleMappingRequest.java @@ -412,6 +412,21 @@ protected static void setupPutRoleMappingRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java index b55343e68..8be0eac01 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java @@ -609,6 +609,21 @@ protected static void setupPutRoleRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutUserRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutUserRequest.java index d862d7b23..3781bae56 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutUserRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutUserRequest.java @@ -446,6 +446,21 @@ protected static void setupPutUserRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _username = 1 << 0; + + int propsSet = 0; + + propsSet |= _username; + + if (propsSet == (_username)) { + params.put("username", request.username); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/QueryApiKeysRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/QueryApiKeysRequest.java index 6c188dd1b..9fa998210 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/QueryApiKeysRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/QueryApiKeysRequest.java @@ -41,6 +41,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -433,6 +434,11 @@ protected static void setupQueryApiKeysRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlAuthenticateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlAuthenticateRequest.java index 62a7968b3..fec9195b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlAuthenticateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlAuthenticateRequest.java @@ -257,6 +257,11 @@ protected static void setupSamlAuthenticateRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlCompleteLogoutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlCompleteLogoutRequest.java index fad37458e..e22704c16 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlCompleteLogoutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlCompleteLogoutRequest.java @@ -295,6 +295,11 @@ protected static void setupSamlCompleteLogoutRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlInvalidateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlInvalidateRequest.java index 052f0e0d2..0b16ae226 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlInvalidateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlInvalidateRequest.java @@ -256,6 +256,11 @@ protected static void setupSamlInvalidateRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlLogoutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlLogoutRequest.java index 6ed784bf2..d81dea4b1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlLogoutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlLogoutRequest.java @@ -205,6 +205,11 @@ protected static void setupSamlLogoutRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlPrepareAuthenticationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlPrepareAuthenticationRequest.java index 83ae97f77..369cc30dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlPrepareAuthenticationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlPrepareAuthenticationRequest.java @@ -251,6 +251,11 @@ protected static void setupSamlPrepareAuthenticationRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlServiceProviderMetadataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlServiceProviderMetadataRequest.java index 1a06d15cf..9642a1e38 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlServiceProviderMetadataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SamlServiceProviderMetadataRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -149,6 +151,21 @@ public SamlServiceProviderMetadataRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _realmName = 1 << 0; + + int propsSet = 0; + + propsSet |= _realmName; + + if (propsSet == (_realmName)) { + params.put("realmName", request.realmName); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SuggestUserProfilesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SuggestUserProfilesRequest.java index 76c967807..1b09e3cfc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SuggestUserProfilesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SuggestUserProfilesRequest.java @@ -322,6 +322,11 @@ protected static void setupSuggestUserProfilesRequestDeserializer( }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateApiKeyRequest.java index 9975c9e86..c3dd49510 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateApiKeyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateApiKeyRequest.java @@ -39,6 +39,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -343,6 +344,21 @@ protected static void setupUpdateApiKeyRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateUserProfileDataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateUserProfileDataRequest.java index c01abef48..db6a5ef57 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateUserProfileDataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateUserProfileDataRequest.java @@ -376,6 +376,21 @@ protected static void setupUpdateUserProfileDataRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _uid = 1 << 0; + + int propsSet = 0; + + propsSet |= _uid; + + if (propsSet == (_uid)) { + params.put("uid", request.uid); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java index c1e73e003..a588ff0d6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java @@ -207,6 +207,21 @@ public DeleteNodeRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + propsSet |= _nodeId; + + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java index 704b7aa08..4103944f9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java @@ -231,6 +231,24 @@ public GetNodeRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.nodeId())) + propsSet |= _nodeId; + + if (propsSet == 0) { + } + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java index b2261ea81..a5fe8cf1c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java @@ -397,6 +397,21 @@ protected static void setupPutNodeRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _nodeId = 1 << 0; + + int propsSet = 0; + + propsSet |= _nodeId; + + if (propsSet == (_nodeId)) { + params.put("nodeId", request.nodeId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/DeleteLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/DeleteLifecycleRequest.java index 50a6b3daa..f2640553a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/DeleteLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/DeleteLifecycleRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public DeleteLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _policyId = 1 << 0; + + int propsSet = 0; + + propsSet |= _policyId; + + if (propsSet == (_policyId)) { + params.put("policyId", request.policyId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteLifecycleRequest.java index c0be63ec4..967bf36ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteLifecycleRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public ExecuteLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _policyId = 1 << 0; + + int propsSet = 0; + + propsSet |= _policyId; + + if (propsSet == (_policyId)) { + params.put("policyId", request.policyId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteRetentionRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteRetentionRequest.java index 21e29e51e..ec83bd3f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteRetentionRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/ExecuteRetentionRequest.java @@ -75,6 +75,11 @@ public ExecuteRetentionRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetLifecycleRequest.java index 528688a0b..699698ac2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetLifecycleRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -172,6 +174,24 @@ public GetLifecycleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _policyId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.policyId())) + propsSet |= _policyId; + + if (propsSet == (_policyId)) { + params.put("policyId", request.policyId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetSlmStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetSlmStatusRequest.java index 970712d48..ffe24f811 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetSlmStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetSlmStatusRequest.java @@ -74,6 +74,11 @@ public GetSlmStatusRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetStatsRequest.java index ad9664fab..65cb0147b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/GetStatsRequest.java @@ -75,6 +75,11 @@ public GetStatsRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/PutLifecycleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/PutLifecycleRequest.java index fcff1896a..c16f6c700 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/PutLifecycleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/PutLifecycleRequest.java @@ -448,6 +448,21 @@ protected static void setupPutLifecycleRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _policyId = 1 << 0; + + int propsSet = 0; + + propsSet |= _policyId; + + if (propsSet == (_policyId)) { + params.put("policyId", request.policyId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StartSlmRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StartSlmRequest.java index 2b5278667..7355d125a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StartSlmRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StartSlmRequest.java @@ -74,6 +74,11 @@ public StartSlmRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StopSlmRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StopSlmRequest.java index 589ceba03..58afecbcf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StopSlmRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/slm/StopSlmRequest.java @@ -74,6 +74,11 @@ public StopSlmRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java index b7a3d76a6..52b261425 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CleanupRepositoryRequest.java @@ -222,6 +222,21 @@ public CleanupRepositoryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java index e20b0e197..dcde79f9f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CloneSnapshotRequest.java @@ -323,6 +323,27 @@ protected static void setupCloneSnapshotRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _targetSnapshot = 1 << 0; + final int _repository = 1 << 1; + final int _snapshot = 1 << 2; + + int propsSet = 0; + + propsSet |= _targetSnapshot; + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot | _targetSnapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot); + params.put("targetSnapshot", request.targetSnapshot); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java index 100675aef..6d3e37857 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateRepositoryRequest.java @@ -368,6 +368,21 @@ protected static void setupCreateRepositoryRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java index c3e40f146..9171b89d5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/CreateSnapshotRequest.java @@ -572,6 +572,24 @@ protected static void setupCreateSnapshotRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java index 6535486ad..e35373b01 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteRepositoryRequest.java @@ -239,6 +239,21 @@ public DeleteRepositoryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java index 9341b8ce3..489db88bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/DeleteSnapshotRequest.java @@ -211,6 +211,24 @@ public DeleteSnapshotRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java index 26c8aedf5..78571d7bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetRepositoryRequest.java @@ -236,6 +236,24 @@ public GetRepositoryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.name())) + propsSet |= _name; + + if (propsSet == 0) { + } + if (propsSet == (_name)) { + params.put("name", request.name.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java index 7e46ef8e8..ae3f5ee01 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/GetSnapshotRequest.java @@ -619,6 +619,24 @@ public GetSnapshotRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java index 0b59a387a..bcc62a939 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RestoreRequest.java @@ -614,6 +614,24 @@ protected static void setupRestoreRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + propsSet |= _repository; + propsSet |= _snapshot; + + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java index fe967ee28..a43bc3148 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotStatusRequest.java @@ -279,6 +279,31 @@ public SnapshotStatusRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _repository = 1 << 0; + final int _snapshot = 1 << 1; + + int propsSet = 0; + + if (request.repository() != null) + propsSet |= _repository; + if (ApiTypeHelper.isDefined(request.snapshot())) + propsSet |= _snapshot; + + if (propsSet == 0) { + } + if (propsSet == (_repository)) { + params.put("repository", request.repository); + } + if (propsSet == (_repository | _snapshot)) { + params.put("repository", request.repository); + params.put("snapshot", request.snapshot.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java index ec1ced4d9..be1c65044 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/VerifyRepositoryRequest.java @@ -221,6 +221,21 @@ public VerifyRepositoryRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _name = 1 << 0; + + int propsSet = 0; + + propsSet |= _name; + + if (propsSet == (_name)) { + params.put("name", request.name); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java index 2f6324d66..4063ceeb5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java @@ -160,6 +160,11 @@ protected static void setupClearCursorRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java index ace358310..44ed8cfcb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeleteAsyncRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java index f5c290313..c77995ef4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java @@ -283,6 +283,21 @@ public GetAsyncRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java index 0f92af7c6..751783f75 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public GetAsyncStatusRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java index 9e66af3d3..72e567ebe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java @@ -43,6 +43,7 @@ import java.lang.Boolean; import java.lang.Integer; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -811,6 +812,11 @@ protected static void setupQueryRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java index 3cc958dfa..23d1c0d17 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java @@ -257,6 +257,11 @@ protected static void setupTranslateRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java index e78e8181a..5986027dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java @@ -75,6 +75,11 @@ public CertificatesRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java index 306616a57..2b708693d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -145,6 +147,21 @@ public DeleteSynonymRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java index cb0964d38..37137c86e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -174,6 +176,24 @@ public DeleteSynonymRuleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _ruleId = 1 << 0; + final int _setId = 1 << 1; + + int propsSet = 0; + + propsSet |= _ruleId; + propsSet |= _setId; + + if (propsSet == (_setId | _ruleId)) { + params.put("setId", request.setId); + params.put("ruleId", request.ruleId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java index d54413ea9..a6ce5de5b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java @@ -201,6 +201,21 @@ public GetSynonymRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java index 17e5940bb..476888f09 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -174,6 +176,24 @@ public GetSynonymRuleRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _ruleId = 1 << 0; + final int _setId = 1 << 1; + + int propsSet = 0; + + propsSet |= _ruleId; + propsSet |= _setId; + + if (propsSet == (_setId | _ruleId)) { + params.put("setId", request.setId); + params.put("ruleId", request.ruleId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java index 01922cf19..9bf9b2fe5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -163,6 +164,11 @@ public GetSynonymsSetsRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java index d31aaf56a..b03200b5a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -235,6 +237,21 @@ protected static void setupPutSynonymRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java index 1f278fd55..279192a2d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java @@ -38,7 +38,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -248,6 +250,24 @@ protected static void setupPutSynonymRuleRequestDeserializer(ObjectDeserializer< }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _ruleId = 1 << 0; + final int _setId = 1 << 1; + + int propsSet = 0; + + propsSet |= _ruleId; + propsSet |= _setId; + + if (propsSet == (_setId | _ruleId)) { + params.put("setId", request.setId); + params.put("ruleId", request.ruleId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java index d4209068c..007779343 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/CancelRequest.java @@ -303,6 +303,24 @@ public CancelRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + if (request.taskId() != null) + propsSet |= _taskId; + + if (propsSet == 0) { + } + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java index 130551175..11c0556f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java @@ -209,6 +209,21 @@ public GetTasksRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java index cccb356ec..11a8aaf93 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java @@ -37,6 +37,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -383,6 +384,11 @@ public ListRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java index dbdf0e811..5ce014a31 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/DeleteTransformRequest.java @@ -217,6 +217,21 @@ public DeleteTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformRequest.java index ae634d44f..80c9d173b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformRequest.java @@ -314,6 +314,25 @@ public GetTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.transformId())) + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", + request.transformId.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformStatsRequest.java index 9a8511746..6a50ce899 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/GetTransformStatsRequest.java @@ -315,6 +315,22 @@ public GetTransformStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", + request.transformId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PreviewTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PreviewTransformRequest.java index 2ea43d7e5..8cf7f5c07 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PreviewTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PreviewTransformRequest.java @@ -621,6 +621,24 @@ protected static void setupPreviewTransformRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + if (request.transformId() != null) + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PutTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PutTransformRequest.java index 734cd1e44..e17867d59 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PutTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/PutTransformRequest.java @@ -717,6 +717,21 @@ protected static void setupPutTransformRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ResetTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ResetTransformRequest.java index f69307f4f..e38b01b40 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ResetTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ResetTransformRequest.java @@ -186,6 +186,21 @@ public ResetTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java index 29c537330..f49ba9d6e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java @@ -190,6 +190,21 @@ public ScheduleNowTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StartTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StartTransformRequest.java index efcf4fcd6..5fcaaac1b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StartTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StartTransformRequest.java @@ -241,6 +241,21 @@ public StartTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StopTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StopTransformRequest.java index ca8a1d6b0..507cb6676 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StopTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/StopTransformRequest.java @@ -335,6 +335,21 @@ public StopTransformRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpdateTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpdateTransformRequest.java index 3fad37f98..46bf96597 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpdateTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpdateTransformRequest.java @@ -606,6 +606,21 @@ protected static void setupUpdateTransformRequestDeserializer( }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _transformId = 1 << 0; + + int propsSet = 0; + + propsSet |= _transformId; + + if (propsSet == (_transformId)) { + params.put("transformId", request.transformId); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpgradeTransformsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpgradeTransformsRequest.java index ffeabcbbc..8b24d66b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpgradeTransformsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/UpgradeTransformsRequest.java @@ -35,6 +35,7 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -182,6 +183,11 @@ public UpgradeTransformsRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/AckWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/AckWatchRequest.java index af83548c2..02895825f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/AckWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/AckWatchRequest.java @@ -36,7 +36,9 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -202,6 +204,28 @@ public AckWatchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _watchId = 1 << 0; + final int _actionId = 1 << 1; + + int propsSet = 0; + + propsSet |= _watchId; + if (ApiTypeHelper.isDefined(request.actionId())) + propsSet |= _actionId; + + if (propsSet == (_watchId)) { + params.put("watchId", request.watchId); + } + if (propsSet == (_watchId | _actionId)) { + params.put("watchId", request.watchId); + params.put("actionId", request.actionId.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ActivateWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ActivateWatchRequest.java index bf81f91d1..3f30042fd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ActivateWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ActivateWatchRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -147,6 +149,21 @@ public ActivateWatchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _watchId = 1 << 0; + + int propsSet = 0; + + propsSet |= _watchId; + + if (propsSet == (_watchId)) { + params.put("watchId", request.watchId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeactivateWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeactivateWatchRequest.java index bd7a6f8fc..69e3a2d2a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeactivateWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeactivateWatchRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -148,6 +150,21 @@ public DeactivateWatchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _watchId = 1 << 0; + + int propsSet = 0; + + propsSet |= _watchId; + + if (propsSet == (_watchId)) { + params.put("watchId", request.watchId); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeleteWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeleteWatchRequest.java index 6f4060f69..2e4eae757 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeleteWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/DeleteWatchRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -146,6 +148,21 @@ public DeleteWatchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ExecuteWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ExecuteWatchRequest.java index 436ea2d67..1a2a71843 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ExecuteWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ExecuteWatchRequest.java @@ -532,6 +532,24 @@ protected static void setupExecuteWatchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + if (request.id() != null) + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + if (propsSet == 0) { + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/GetWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/GetWatchRequest.java index 44110ee19..d54689f7c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/GetWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/GetWatchRequest.java @@ -36,6 +36,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -144,6 +146,21 @@ public GetWatchRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/PutWatchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/PutWatchRequest.java index 07a8f886c..de3817614 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/PutWatchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/PutWatchRequest.java @@ -562,6 +562,21 @@ protected static void setupPutWatchRequestDeserializer(ObjectDeserializer { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/QueryWatchesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/QueryWatchesRequest.java index 69601c1b8..f21b74140 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/QueryWatchesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/QueryWatchesRequest.java @@ -371,6 +371,11 @@ protected static void setupQueryWatchesRequestDeserializer(ObjectDeserializer { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StartWatcherRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StartWatcherRequest.java index 6e9c314cf..c0a21390d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StartWatcherRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StartWatcherRequest.java @@ -74,6 +74,11 @@ public StartWatcherRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StopWatcherRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StopWatcherRequest.java index 55bae6c3f..97d936a07 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StopWatcherRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/StopWatcherRequest.java @@ -74,6 +74,11 @@ public StopWatcherRequest() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { return Collections.emptyMap(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/WatcherStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/WatcherStatsRequest.java index 7c6f42541..87f547439 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/WatcherStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/WatcherStatsRequest.java @@ -200,6 +200,25 @@ public WatcherStatsRequest build() { }, + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _metric = 1 << 0; + + int propsSet = 0; + + if (ApiTypeHelper.isDefined(request.metric())) + propsSet |= _metric; + + if (propsSet == 0) { + } + if (propsSet == (_metric)) { + params.put("metric", + request.metric.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + return params; + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackInfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackInfoRequest.java index e91423bcf..7e78fe803 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackInfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackInfoRequest.java @@ -36,6 +36,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -210,6 +211,11 @@ public XpackInfoRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackUsageRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackUsageRequest.java index 82c1c73b3..a3462d719 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackUsageRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/XpackUsageRequest.java @@ -34,6 +34,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -148,6 +149,11 @@ public XpackUsageRequest build() { }, + // Path parameters + request -> { + return Collections.emptyMap(); + }, + // Request parameters request -> { Map params = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/transport/ElasticsearchTransportBase.java b/java-client/src/main/java/co/elastic/clients/transport/ElasticsearchTransportBase.java index 2a27db247..e8e0b8459 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/ElasticsearchTransportBase.java +++ b/java-client/src/main/java/co/elastic/clients/transport/ElasticsearchTransportBase.java @@ -30,6 +30,9 @@ import co.elastic.clients.transport.endpoints.BooleanResponse; import co.elastic.clients.transport.http.HeaderMap; import co.elastic.clients.transport.http.TransportHttpClient; +import co.elastic.clients.transport.instrumentation.Instrumentation; +import co.elastic.clients.transport.instrumentation.NoopInstrumentation; +import co.elastic.clients.transport.instrumentation.OpenTelemetryForElasticsearch; import co.elastic.clients.util.LanguageRuntimeVersions; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.BinaryData; @@ -74,6 +77,7 @@ public abstract class ElasticsearchTransportBase implements ElasticsearchTranspo } private final TransportHttpClient httpClient; + private final Instrumentation instrumentation; @Override public void close() throws IOException { @@ -84,9 +88,27 @@ public void close() throws IOException { protected final TransportOptions transportOptions; public ElasticsearchTransportBase(TransportHttpClient httpClient, TransportOptions options, JsonpMapper jsonpMapper) { + this(httpClient, options, jsonpMapper, null); + } + + public ElasticsearchTransportBase( + TransportHttpClient httpClient, + TransportOptions options, + JsonpMapper jsonpMapper, + @Nullable Instrumentation instrumentation + ) { this.mapper = jsonpMapper; this.httpClient = httpClient; this.transportOptions = httpClient.createOptions(options); + + // If no instrumentation is provided, fallback to OpenTelemetry and ultimately noop + if (instrumentation == null) { + instrumentation = OpenTelemetryForElasticsearch.getDefault(); + } + if (instrumentation == null) { + instrumentation = NoopInstrumentation.INSTANCE; + } + this.instrumentation = instrumentation; } @Override @@ -105,10 +127,25 @@ public final ResponseT performRequest( Endpoint endpoint, @Nullable TransportOptions options ) throws IOException { - TransportOptions opts = options == null ? transportOptions : options; - TransportHttpClient.Request req = prepareTransportRequest(request, endpoint); - TransportHttpClient.Response resp = httpClient.performRequest(endpoint.id(), null, req, opts); - return getApiResponse(resp, endpoint); + try (Instrumentation.Context ctx = instrumentation.newContext(request, endpoint)) { + try (Instrumentation.ThreadScope ts = ctx.makeCurrent()) { + + TransportOptions opts = options == null ? transportOptions : options; + TransportHttpClient.Request req = prepareTransportRequest(request, endpoint); + ctx.beforeSendingHttpRequest(req, options); + + TransportHttpClient.Response resp = httpClient.performRequest(endpoint.id(), null, req, opts); + ctx.afterReceivingHttpResponse(resp); + + ResponseT apiResponse = getApiResponse(resp, endpoint); + ctx.afterDecodingApiResponse(apiResponse); + + return apiResponse; + } catch (Throwable throwable){ + ctx.recordException(throwable); + throw throwable; + } + } } @Override @@ -117,12 +154,17 @@ public final CompletableFuture performR Endpoint endpoint, @Nullable TransportOptions options ) { + Instrumentation.Context ctx = instrumentation.newContext(request, endpoint); + TransportOptions opts = options == null ? transportOptions : options; TransportHttpClient.Request clientReq; - try { + try (Instrumentation.ThreadScope ss = ctx.makeCurrent()) { clientReq = prepareTransportRequest(request, endpoint); + ctx.beforeSendingHttpRequest(clientReq, options); } catch (Exception e) { // Terminate early + ctx.recordException(e); + ctx.close(); CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; @@ -148,17 +190,27 @@ public boolean cancel(boolean mayInterruptIfRunning) { }; clientFuture.handle((clientResp, thr) -> { - if (thr != null) { - future.completeExceptionally(thr); - } else { - try (ApiTypeHelper.DisabledChecksHandle h = - ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(disableRequiredChecks)) { - - ResponseT response = getApiResponse(clientResp, endpoint); - future.complete(response); + try (Instrumentation.ThreadScope ts = ctx.makeCurrent()) { + if (thr != null) { + // Exception executing the http request + ctx.recordException(thr); + ctx.close(); + future.completeExceptionally(thr); - } catch (Throwable e) { - future.completeExceptionally(e); + } else { + try (ApiTypeHelper.DisabledChecksHandle h = + ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(disableRequiredChecks)) { + ctx.afterReceivingHttpResponse(clientResp); + ResponseT response = getApiResponse(clientResp, endpoint); + ctx.afterDecodingApiResponse(response); + future.complete(response); + + } catch (Throwable e) { + ctx.recordException(e); + future.completeExceptionally(e); + } finally { + ctx.close(); + } } } return null; diff --git a/java-client/src/main/java/co/elastic/clients/transport/Endpoint.java b/java-client/src/main/java/co/elastic/clients/transport/Endpoint.java index 2ef0a0989..3ed47254d 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/Endpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/Endpoint.java @@ -56,6 +56,13 @@ public interface Endpoint { */ String requestUrl(RequestT request); + /** + * Get the path parameters for a request. + */ + default Map pathParameters(RequestT request) { + return Collections.emptyMap(); + } + /** * Get the query parameters for a request. */ @@ -104,6 +111,7 @@ default BinaryEndpoint withBinaryResponse() { this.id(), this::method, this::requestUrl, + this::pathParameters, this::queryParameters, this::headers, this::body, diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/BinaryEndpoint.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/BinaryEndpoint.java index 5a7d52b0f..4a7e56b69 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/BinaryEndpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/BinaryEndpoint.java @@ -28,26 +28,30 @@ public BinaryEndpoint( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, Function body, Object ignored // same number of arguments as SimpleEndpoint ) { - super(id, method, requestUrl, queryParameters, headers, body); + super(id, method, requestUrl, pathParameters, queryParameters, headers, body); } public BinaryEndpoint( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, boolean hasRequestBody, Object ignored // same number of arguments as SimpleEndpoint ) { - super(id, method, requestUrl, queryParameters, headers, hasRequestBody ? returnSelf() : returnNull()); + super(id, method, requestUrl, pathParameters, queryParameters, headers, hasRequestBody ? returnSelf() : returnNull()); } @Override diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/BooleanEndpoint.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/BooleanEndpoint.java index e9c386c8e..f2cbf967a 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/BooleanEndpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/BooleanEndpoint.java @@ -28,13 +28,15 @@ public BooleanEndpoint( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, boolean hasRequestBody, Object ignored // same number of arguments as SimpleEndpoint ) { - super(id, method, requestUrl, queryParameters, headers, hasRequestBody ? returnSelf() : returnNull()); + super(id, method, requestUrl, pathParameters, queryParameters, headers, hasRequestBody ? returnSelf() : returnNull()); } @Override diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/DelegatingJsonEndpoint.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/DelegatingJsonEndpoint.java index d79ba91f6..1ef0d816f 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/DelegatingJsonEndpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/DelegatingJsonEndpoint.java @@ -48,6 +48,11 @@ public String requestUrl(Req request) { return endpoint.requestUrl(request); } + @Override + public Map pathParameters(Req request) { + return endpoint.pathParameters(request); + } + @Override public Map queryParameters(Req request) { return endpoint.queryParameters(request); diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/EndpointBase.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/EndpointBase.java index e845e0a35..04610f707 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/EndpointBase.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/EndpointBase.java @@ -66,6 +66,7 @@ static Function returnSelf() { protected final String id; protected final Function method; protected final Function requestUrl; + protected final Function> pathParameters; protected final Function> queryParameters; protected final Function> headers; protected final Function body; @@ -74,6 +75,7 @@ public EndpointBase( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, Function body @@ -81,6 +83,7 @@ public EndpointBase( this.id = id; this.method = method; this.requestUrl = requestUrl; + this.pathParameters = pathParameters; this.queryParameters = queryParameters; this.headers = headers; this.body = body; @@ -101,6 +104,11 @@ public String requestUrl(RequestT request) { return this.requestUrl.apply(request); } + @Override + public Map pathParameters(RequestT request) { + return this.pathParameters.apply(request); + } + @Override public Map queryParameters(RequestT request) { return this.queryParameters.apply(request); @@ -135,6 +143,7 @@ public SimpleEndpoint withResponseDeseria id, method, requestUrl, + pathParameters, queryParameters, headers, body, diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleEndpoint.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleEndpoint.java index b5df37c90..9e3cb592d 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleEndpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleEndpoint.java @@ -35,12 +35,13 @@ public SimpleEndpoint( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, Function body, JsonpDeserializer responseParser ) { - super(id, method, requestUrl, queryParameters, headers, body); + super(id, method, requestUrl, pathParameters, queryParameters, headers, body); this.responseParser = responseParser; } @@ -48,6 +49,7 @@ public SimpleEndpoint( String id, Function method, Function requestUrl, + Function> pathParameters, Function> queryParameters, Function> headers, boolean hasResponseBody, @@ -57,6 +59,7 @@ public SimpleEndpoint( id, method, requestUrl, + pathParameters, queryParameters, headers, hasResponseBody ? returnSelf() : returnNull(), @@ -81,6 +84,7 @@ public SimpleEndpoint withResponseDeseria id, method, requestUrl, + pathParameters, queryParameters, headers, body, diff --git a/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleJsonEndpoint.java b/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleJsonEndpoint.java index c97a03675..6d480b2fe 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleJsonEndpoint.java +++ b/java-client/src/main/java/co/elastic/clients/transport/endpoints/SimpleJsonEndpoint.java @@ -34,11 +34,13 @@ public SimpleJsonEndpoint( Function method, Function requestUrl, Function> queryParameters, + Map> pathParameters, + Function> queryParameters, Function> headers, boolean hasRequestBody, JsonpDeserializer responseParser ) { - super(id, method, requestUrl, queryParameters, headers, hasRequestBody, responseParser); + super(id, method, requestUrl, pathParameters, queryParameters, headers, hasRequestBody, responseParser); } } diff --git a/java-client/src/main/java/co/elastic/clients/transport/instrumentation/Instrumentation.java b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/Instrumentation.java new file mode 100644 index 000000000..f4eca1ab0 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/Instrumentation.java @@ -0,0 +1,79 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.transport.instrumentation; + +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.http.TransportHttpClient; + +/** + * Instrumentation for an Elasticsearch client. It allows creating a {@link Instrumentation.Context} for each request, + * with callbacks for the various stages of request and response processing. + */ +public interface Instrumentation { + + /** + * Create a context for a given request and the corresponding endpoint. + */ + Context newContext(TRequest request, Endpoint endpoint); + + /** + * A context with lifecycle callbacks for the various stages of request and response processing. Must be {@link #close()}d. + */ + interface Context extends AutoCloseable { + + /** + * Sets this context (or the underlying abstraction) as the current thread's scope, so that neste call can + * nest child contexts. + */ + ThreadScope makeCurrent(); + + /** + * Called once the initial API request has been serialized and the http request has been prepared. + */ + void beforeSendingHttpRequest(TransportHttpClient.Request httpRequest, TransportOptions options); + + /** + * Called after the http response has been received, and before analyzing it. + */ + void afterReceivingHttpResponse(TransportHttpClient.Response httpResponse); + + /** + * Called after the http response has been deserialized + */ + void afterDecodingApiResponse(TResponse apiResponse); + + /** + * Called when any stage of request processing caused a failure. + */ + void recordException(Throwable thr); + + @Override + void close(); + } + + /** + * A thread scope. Closing it will detach the scope from the current thread. + */ + interface ThreadScope extends AutoCloseable { + @Override + void close(); + } +} diff --git a/java-client/src/main/java/co/elastic/clients/transport/instrumentation/NoopInstrumentation.java b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/NoopInstrumentation.java new file mode 100644 index 000000000..c3b5a2b6d --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/NoopInstrumentation.java @@ -0,0 +1,70 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.transport.instrumentation; + +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.http.TransportHttpClient; + +/** + * A no-operation instrumentation. Used when no instrumentation has been set. It can also be used to + * bypass OpenTelemetry automatic discovery. + */ +public class NoopInstrumentation implements Instrumentation { + + public static NoopInstrumentation INSTANCE = new NoopInstrumentation(); + + private NoopInstrumentation() {} + + @Override + public Context newContext(TRequest request, Endpoint endpoint) { + return CONTEXT; + } + + private static final NoopContext CONTEXT = new NoopContext(); + private static final NoopScope SCOPE = new NoopScope(); + + private static class NoopContext implements Instrumentation.Context { + @Override + public ThreadScope makeCurrent() { + return SCOPE; + } + + @Override + public void beforeSendingHttpRequest(TransportHttpClient.Request httpRequest, TransportOptions options) {} + + @Override + public void afterReceivingHttpResponse(TransportHttpClient.Response httpResponse) {} + + @Override + public void afterDecodingApiResponse(TResponse apiResponse) {} + + @Override + public void recordException(Throwable thr) {} + + @Override + public void close() {} + } + + private static class NoopScope implements Instrumentation.ThreadScope { + @Override + public void close() {} + } +} diff --git a/java-client/src/main/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearch.java b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearch.java new file mode 100644 index 000000000..03d6dcfc6 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearch.java @@ -0,0 +1,367 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.transport.instrumentation; + +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.Version; +import co.elastic.clients.transport.http.TransportHttpClient; +import io.opentelemetry.api.GlobalOpenTelemetry; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.trace.Span; +import io.opentelemetry.api.trace.SpanKind; +import io.opentelemetry.api.trace.StatusCode; +import io.opentelemetry.api.trace.Tracer; +import io.opentelemetry.context.Scope; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.annotation.Nullable; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URLEncoder; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +/** + * An OpenTelemetry instrumentation for the Elasticsearch client. + * + * @see OpenTelemetry semantic conventions + * for Elasticsearch + */ + +public class OpenTelemetryForElasticsearch implements Instrumentation { + + private static final Set SEARCH_ENDPOINTS = new HashSet<>(Arrays.asList( + "render_search_template", + "terms_enum", + "msearch_template", + "eql.search", + "msearch", + "search_template", + "async_search.submit", + "search" + )); + + private static final AttributeKey ATTR_DB_SYSTEM = AttributeKey.stringKey("db.system"); + private static final AttributeKey ATTR_DB_OPERATION = AttributeKey.stringKey("db.operation"); + private static final AttributeKey ATTR_DB_STATEMENT = AttributeKey.stringKey("db.statement"); + // Use Semantic Convention keys once opentelemetry-semconv is stable + //private static final AttributeKey ATTR_DB_SYSTEM = SemanticAttributes.DB_SYSTEM; + //private static final AttributeKey ATTR_DB_OPERATION = SemanticAttributes.DB_OPERATION; + //private static final AttributeKey ATTR_DB_STATEMENT = SemanticAttributes.DB_STATEMENT; + + private static final AttributeKey ATTR_HTTP_REQUEST_METHOD = AttributeKey.stringKey("http.request.method"); + private static final AttributeKey ATTR_URL_FULL = AttributeKey.stringKey("url.full"); + private static final AttributeKey ATTR_SERVER_ADDRESS = AttributeKey.stringKey("server.address"); + private static final AttributeKey ATTR_SERVER_PORT = AttributeKey.longKey("server.port"); + + // Caching attributes keys to avoid unnecessary memory allocation + private static final Map> attributesKeyCache = new ConcurrentHashMap<>(); + + private static final String PATH_PART_PREFIX = "db.elasticsearch.path_parts."; + + // these reflect the config options in the OTel Java agent + private static final boolean INSTRUMENTATION_ENABLED = Boolean.parseBoolean( + ConfigUtil.getConfigOption("otel.instrumentation.elasticsearch.enabled", "true") + ); + + private static final boolean CAPTURE_SEARCH_BODY = Boolean.parseBoolean( + ConfigUtil.getConfigOption("otel.instrumentation.elasticsearch.capture-search-query", "false") + ); + + private static final Log logger = LogFactory.getLog(OpenTelemetryForElasticsearch.class); + + private final Tracer tracer; + private final boolean captureSearchBody; + + /** + * Creates an OpenTelemetry instrumentation based on systems settings: + *
    + *
  • {@code otel.instrumentation.elasticsearch.enabled} system property or + * {@code OTEL_INSTRUMENTATION_ELASTICSEARCH_ENABLED} environnement variable: if {@code true} instrumentation is enabled. + * Defaults to {@code true}. + *
  • + *
  • {@code otel.instrumentation.elasticsearch.capture-search-query} system property or + * {@code OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY} environment variable: if {@code true} the request body + * of search requests will be captured. Defaults to {@code false}. + *
  • + *
+ * + * @return an instrumentation, or {@code null} if instrumentation is disabled or no OTel agent has been configured. + */ + public static @Nullable OpenTelemetryForElasticsearch getDefault() { + + // See https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#configuring-the-agent + boolean enabled = Boolean.parseBoolean( + ConfigUtil.getConfigOption("otel.instrumentation.elasticsearch.enabled", "true") + ); + + if (!enabled) { + return null; + } + + OpenTelemetry openTelemetry = GlobalOpenTelemetry.get(); + if (openTelemetry == OpenTelemetry.noop()) { + // Do not waste time with noop impls that do have a cost, even if marginal + return null; + } + + boolean captureSearchBody = Boolean.parseBoolean( + ConfigUtil.getConfigOption("otel.instrumentation.elasticsearch.capture-search-query", "false") + ); + + return new OpenTelemetryForElasticsearch(openTelemetry, captureSearchBody); + } + + /** + * Creates an OpenTelemetry instrumentation. + * + * @param openTelemetry the OpenTelemetry implementation + * @param captureSearchBody should search requests bodies be captured? + */ + public OpenTelemetryForElasticsearch(OpenTelemetry openTelemetry, boolean captureSearchBody) { + Version version = Version.VERSION; + + this.tracer = openTelemetry.tracerBuilder("elasticsearch-api") + .setInstrumentationVersion(version == null ? "unknown" : version.toString()) + .setSchemaUrl("https://opentelemetry.io/schemas/1.21.0") + .build(); + + this.captureSearchBody = captureSearchBody; + } + + @Override + public Context newContext(TRequest request, Endpoint endpoint) { + return new OTelContext(request, endpoint); + } + + private boolean shouldCaptureBody(Span span, String endpointId) { + return captureSearchBody && span.isRecording() && SEARCH_ENDPOINTS.contains(endpointId); + } + + //--------------------------------------------------------------------------------------------- + + class OTelContext implements Instrumentation.Context { + + private final Span span; + private String endpointId; + private String pathAndQuery = null; + + OTelContext(TRequest request, Endpoint endpoint) { + + // calling the instrumentation class should never throw an exception + Span span; + String endpointId; + try { + endpointId = endpoint.id(); + if (endpointId.startsWith("es/")) { + endpointId = endpointId.substring(3); + } + this.endpointId = endpointId; + + span = tracer.spanBuilder(endpointId).setSpanKind(SpanKind.CLIENT).startSpan(); + if (span.isRecording()) { + span.setAttribute(ATTR_DB_SYSTEM, "elasticsearch"); + span.setAttribute(ATTR_DB_OPERATION, endpointId); + span.setAttribute(ATTR_HTTP_REQUEST_METHOD, endpoint.method(request)); + + for (Map.Entry pathParamEntry : endpoint.pathParameters(request).entrySet()) { + AttributeKey attributeKey = attributesKeyCache.computeIfAbsent(pathParamEntry.getKey(), + (key) -> AttributeKey.stringKey(PATH_PART_PREFIX + key)); + span.setAttribute(attributeKey, pathParamEntry.getValue()); + } + } + } catch (RuntimeException e) { + logger.debug("Failed creating an OpenTelemetry span for endpoint '" + endpoint.id() + "'.", e); + span = Span.getInvalid(); + } + + this.span = span; + } + + @Override + public void beforeSendingHttpRequest(TransportHttpClient.Request httpRequest, TransportOptions options) { + // calling the instrumentation class should never throw an exception + try { + + this.pathAndQuery = pathAndQuery(httpRequest, options); + + span.setAttribute(ATTR_HTTP_REQUEST_METHOD, httpRequest.method()); + Iterable body = httpRequest.body(); + if (body != null && shouldCaptureBody(span, endpointId)) { + StringBuilder sb = new StringBuilder(); + for (ByteBuffer buf: body) { + buf.mark(); + sb.append(StandardCharsets.UTF_8.decode(buf)); + buf.reset(); + } + span.setAttribute(ATTR_DB_STATEMENT, sb.toString()); + } + } catch (Exception e) { + logger.debug("Failed reading HTTP body content for an OpenTelemetry span.", e); + } + } + + @Override + public void afterReceivingHttpResponse(TransportHttpClient.Response httpResponse) { + // calling the instrumentation class should never throw an exception + try { + if (span.isRecording()) { + URI uri = httpResponse.node().uri(); + String fullUrl = uri.resolve(pathAndQuery).toString(); + + span.setAttribute(ATTR_URL_FULL, fullUrl); + span.setAttribute(ATTR_SERVER_PORT, uri.getPort()); + span.setAttribute(ATTR_SERVER_ADDRESS, uri.getHost()); + } + } catch (RuntimeException e) { + logger.debug("Failed capturing response information for the OpenTelemetry span.", e); + // ignore + } + } + + @Override + public void afterDecodingApiResponse(TResponse apiResponse) { + // Nothing + } + + @Override + public void recordException(Throwable throwable) { + span.setStatus(StatusCode.ERROR, throwable.getMessage()); + span.recordException(throwable); + } + + @Override + public void close() { + span.end(); + } + + @Override + public ThreadScope makeCurrent() { + return new OTelScope(this.span); + } + } + + //--------------------------------------------------------------------------------------------- + + class OTelScope implements Instrumentation.ThreadScope { + + private final Scope scope; + + OTelScope(Span span) { + this.scope = span.makeCurrent(); + } + + @Override + public void close() { + this.scope.close(); + } + } + + //--------------------------------------------------------------------------------------------- + + private String pathAndQuery(TransportHttpClient.Request request, TransportOptions options) { + + String path = request.path(); + path = path.length() > 0 && path.charAt(0) == '/' ? path.substring(1) : path; + + Map requestParams = request.queryParams(); + Map optionsParams = options == null ? Collections.emptyMap() : options.queryParameters(); + + Map allParams; + if (requestParams.isEmpty()) { + allParams = optionsParams; + } else if (optionsParams.isEmpty()) { + allParams = requestParams; + } else { + allParams = new HashMap<>(requestParams); + allParams.putAll(optionsParams); + } + + if (allParams.isEmpty()) { + return path; + } + + StringBuilder sb = new StringBuilder(path); + char sep = '?'; + for (Map.Entry e: allParams.entrySet()) { + sb.append(sep); + sep = '&'; + try { + sb.append(URLEncoder.encode(e.getKey(), "UTF-8")); + sb.append('='); + sb.append(URLEncoder.encode(e.getValue(), "UTF-8")); + } catch (UnsupportedEncodingException ex) { + // Should not happen + throw new RuntimeException(ex); + } + } + return sb.toString(); + } + + /** + * Borrowed from io.opentelemetry.api.internal.ConfigUtil + */ + private static final class ConfigUtil { + /** + * Find a configuration option first as a JVM system property, and second as an environment variable + */ + private static String getConfigOption(String key, String defaultValue) { + String normalizedKey = normalizePropertyKey(key); + String systemProperty = System.getProperties().entrySet().stream() + .filter(entry -> normalizedKey.equals(normalizePropertyKey(entry.getKey().toString()))) + .map(entry -> entry.getValue().toString()) + .findFirst() + .orElse(null); + if (systemProperty != null) { + return systemProperty; + } + return System.getenv().entrySet().stream() + .filter(entry -> normalizedKey.equals(normalizeEnvironmentVariableKey(entry.getKey()))) + .map(Map.Entry::getValue) + .findFirst() + .orElse(defaultValue); + } + + /** + * Normalize an environment variable key by converting to lower case and replacing "_" with ".". + */ + private static String normalizeEnvironmentVariableKey(String key) { + return key.toLowerCase(Locale.ROOT).replace("_", "."); + } + + /** + * Normalize a property key by converting to lower case and replacing "-" with ".". + */ + private static String normalizePropertyKey(String key) { + return key.toLowerCase(Locale.ROOT).replace("-", "."); + } + } +} diff --git a/java-client/src/main/java/co/elastic/clients/transport/rest_client/RestClientTransport.java b/java-client/src/main/java/co/elastic/clients/transport/rest_client/RestClientTransport.java index 563f59cd8..dbadfbe1a 100644 --- a/java-client/src/main/java/co/elastic/clients/transport/rest_client/RestClientTransport.java +++ b/java-client/src/main/java/co/elastic/clients/transport/rest_client/RestClientTransport.java @@ -21,9 +21,9 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.transport.ElasticsearchTransportBase; +import co.elastic.clients.transport.instrumentation.Instrumentation; import org.elasticsearch.client.RestClient; - public class RestClientTransport extends ElasticsearchTransportBase { private final RestClient restClient; @@ -33,7 +33,12 @@ public RestClientTransport(RestClient restClient, JsonpMapper jsonpMapper) { } public RestClientTransport(RestClient restClient, JsonpMapper jsonpMapper, RestClientOptions options) { - super(new RestClientHttpClient(restClient), options, jsonpMapper); + super(new RestClientHttpClient(restClient), options, jsonpMapper, null); + this.restClient = restClient; + } + + public RestClientTransport(RestClient restClient, JsonpMapper jsonpMapper, RestClientOptions options, Instrumentation instrumentation) { + super(new RestClientHttpClient(restClient), options, jsonpMapper, instrumentation); this.restClient = restClient; } diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooOptRequest.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooOptRequest.java index bfad18282..7a4c4827a 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooOptRequest.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooOptRequest.java @@ -264,6 +264,7 @@ public FooOptRequest build() { r -> "/foo", SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), true, FooResponse.PARSER ) { diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooRequest.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooRequest.java index 4e1d894b1..6c802c66a 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooRequest.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/FooRequest.java @@ -304,6 +304,7 @@ public static JsonpDeserializer parser() { r -> "/foo", SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), true, FooResponse.PARSER ); diff --git a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/generics/GenericClass.java b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/generics/GenericClass.java index 0ee0418b3..85d4de0c6 100644 --- a/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/generics/GenericClass.java +++ b/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/generics/GenericClass.java @@ -107,12 +107,13 @@ public static Endpoint, ErrorResponse "genclass", // Request method request -> "GET", - // Request path request -> "/genclass", - + // Path parameters + SimpleEndpoint.emptyMap(), // Request parameters SimpleEndpoint.emptyMap(), + // Headers SimpleEndpoint.emptyMap(), true, GenericClass.parser(genParamDeserializer) diff --git a/java-client/src/test/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearchTest.java b/java-client/src/test/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearchTest.java new file mode 100644 index 000000000..f9435165d --- /dev/null +++ b/java-client/src/test/java/co/elastic/clients/transport/instrumentation/OpenTelemetryForElasticsearchTest.java @@ -0,0 +1,275 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.transport.instrumentation; + +import co.elastic.clients.elasticsearch.ElasticsearchAsyncClient; +import co.elastic.clients.elasticsearch.ElasticsearchClient; +import co.elastic.clients.elasticsearch._types.query_dsl.Query; +import co.elastic.clients.elasticsearch.core.SearchRequest; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.jackson.JacksonJsonpMapper; +import co.elastic.clients.transport.rest_client.RestClientTransport; +import com.sun.net.httpserver.HttpServer; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.common.CompletableResultCode; +import io.opentelemetry.sdk.resources.Resource; +import io.opentelemetry.sdk.trace.SdkTracerProvider; +import io.opentelemetry.sdk.trace.data.SpanData; +import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; +import io.opentelemetry.sdk.trace.export.SpanExporter; +import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; +import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; +import org.apache.http.HttpHost; +import org.elasticsearch.client.RestClient; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class OpenTelemetryForElasticsearchTest { + private static final String INDEX = "test-index"; + private static final String DOC_ID = "1234567"; + private static final String DOC_RESPONSE = "{\n" + + " \"_index\": \"" + INDEX + "\",\n" + + " \"_id\": \"" + DOC_ID + "\",\n" + + " \"_version\": 1,\n" + + " \"_seq_no\": 0,\n" + + " \"_primary_term\": 1,\n" + + " \"found\": true,\n" + + " \"_source\": {\n" + + " \"@timestamp\": \"2099-11-15T14:12:12\",\n" + + " \"message\": \"GET /search HTTP/1.1 200 1070000\"\n" + + " }\n" + + "}"; + private static final String SEARCH_RESPONSE = "{\n" + + " \"took\": 5,\n" + + " \"timed_out\": false,\n" + + " \"_shards\": {\n" + + " \"total\": 1,\n" + + " \"successful\": 1,\n" + + " \"skipped\": 0,\n" + + " \"failed\": 0\n" + + " },\n" + + " \"hits\": {\n" + + " \"total\": {\n" + + " \"value\": 1,\n" + + " \"relation\": \"eq\"\n" + + " },\n" + + " \"max_score\": 1.3862942,\n" + + " \"hits\": [\n" + + " {\n" + + " \"_index\": \"" + INDEX + "\",\n" + + " \"_id\": \"" + DOC_ID + "\",\n" + + " \"_score\": 1.3862942,\n" + + " \"_source\": {\n" + + " \"@timestamp\": \"2099-11-15T14:12:12\",\n" + + " \"message\": \"GET /search HTTP/1.1 200 1070000\"\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + public static final String DB_OPERATION = "db.operation"; + public static final String URL_FULL = "url.full"; + public static final String SERVER_ADDRESS = "server.address"; + public static final String SERVER_PORT = "server.port"; + // has been renamed in 1.21 from http.method - see https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.21.0 + public static final String HTTP_REQUEST_METHOD = "http.request.method"; + private static HttpServer httpServer; + private static MockSpanExporter spanExporter; + private static OpenTelemetry openTelemetry; + private static RestClient restClient; + private static RestClientTransport transport; + private static ElasticsearchClient client; + private static ElasticsearchAsyncClient asyncClient; + + @BeforeAll + public static void setup() throws IOException { + setupOTel(); + setupHttpServer(); + setupClient(); + } + + @AfterAll + public static void cleanUp() throws IOException { + httpServer.stop(0); + transport.close(); + } + + private static void setupClient() { + restClient = + RestClient.builder(new HttpHost(httpServer.getAddress().getAddress(), httpServer.getAddress().getPort())).build(); + + Instrumentation instrumentation = new OpenTelemetryForElasticsearch(openTelemetry, false); + + transport = new RestClientTransport(restClient, new JacksonJsonpMapper(), null, instrumentation); + + client = new ElasticsearchClient(transport); + asyncClient = new ElasticsearchAsyncClient(transport); + } + + private static void setupHttpServer() throws IOException { + httpServer = HttpServer.create(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 0); + + // handler for GetRequest + httpServer.createContext("/" + INDEX + "/_doc/" + DOC_ID, exchange -> { + exchange.getResponseHeaders().set("X-Elastic-Product", "Elasticsearch"); + exchange.getResponseHeaders().set("Content-Type", "application/json"); + exchange.sendResponseHeaders(200, 0); + exchange.getResponseBody().write(DOC_RESPONSE.getBytes()); + exchange.close(); + }); + + // handler for SearchRequest + httpServer.createContext("/" + INDEX + "/_search", exchange -> { + exchange.getResponseHeaders().set("X-Elastic-Product", "Elasticsearch"); + exchange.getResponseHeaders().set("Content-Type", "application/json"); + exchange.sendResponseHeaders(200, 0); + exchange.getResponseBody().write(SEARCH_RESPONSE.getBytes()); + exchange.close(); + }); + + httpServer.start(); + } + + private static void setupOTel() { + Resource resource = Resource.getDefault() + .merge(Resource.create(Attributes.of(ResourceAttributes.SERVICE_NAME, "es-api-test"))); + + spanExporter = new MockSpanExporter(); + + SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder() + .addSpanProcessor(SimpleSpanProcessor.create(spanExporter)) + .setResource(resource) + .build(); + + openTelemetry = OpenTelemetrySdk.builder() + .setTracerProvider(sdkTracerProvider) + .build(); + } + + @BeforeEach + public void reset() { + spanExporter.reset(); + } + + @Test + public void testGetRequest() throws IOException, InterruptedException { + client.get(r -> r.index(INDEX).id(DOC_ID).refresh(true), Object.class); + Assertions.assertEquals(spanExporter.getSpans().size(), 1); + SpanData span = spanExporter.getSpans().get(0); + Assertions.assertEquals("get", span.getName()); + Assertions.assertEquals("get", span.getAttributes().get(AttributeKey.stringKey(DB_OPERATION))); + Assertions.assertEquals("GET", span.getAttributes().get(AttributeKey.stringKey(HTTP_REQUEST_METHOD))); + Assertions.assertEquals("elasticsearch", span.getAttributes().get(SemanticAttributes.DB_SYSTEM)); + + String url = "http://" + httpServer.getAddress().getHostName() + ":" + httpServer.getAddress().getPort() + + "/" + INDEX + "/_doc/" + DOC_ID + "?refresh=true"; + Assertions.assertEquals(url, span.getAttributes().get(AttributeKey.stringKey(URL_FULL))); + Assertions.assertEquals(httpServer.getAddress().getHostName(), span.getAttributes().get(AttributeKey.stringKey(SERVER_ADDRESS))); + Assertions.assertEquals(httpServer.getAddress().getPort(), span.getAttributes().get(AttributeKey.longKey(SERVER_PORT))); + + // Path parts + Assertions.assertEquals(DOC_ID, span.getAttributes().get(AttributeKey.stringKey("db.elasticsearch.path_parts.id"))); + } + + @Test + public void testSearchRequest() throws IOException, InterruptedException { + // A client that will capture requests + ElasticsearchClient client = new ElasticsearchClient(new RestClientTransport( + restClient, this.client._jsonpMapper(), null, new OpenTelemetryForElasticsearch(openTelemetry, true)) + ); + SearchRequest req = SearchRequest.of(r -> r.index(INDEX).query(q -> q.term(t -> t.field("x").value("y")))); + String queryAsString = JsonpUtils.toJsonString(req, client._jsonpMapper()); + client.search(req, Object.class); + Assertions.assertEquals(spanExporter.getSpans().size(), 1); + SpanData span = spanExporter.getSpans().get(0); + Assertions.assertEquals("search", span.getName()); + Assertions.assertEquals(queryAsString, span.getAttributes().get(SemanticAttributes.DB_STATEMENT)); + } + + @Test + public void testAsyncSearchRequest() throws IOException, InterruptedException, TimeoutException, ExecutionException { + Query query = Query.of(q -> q.term(t -> t.field("x").value("y"))); + Future future = asyncClient.search(r -> r.index(INDEX).query(query), Object.class); + future.get(2, TimeUnit.SECONDS); + spanExporter.awaitNumSpans(1, 2000); + Assertions.assertEquals(spanExporter.getSpans().size(), 1); + SpanData span = spanExporter.getSpans().get(0); + Assertions.assertEquals("search", span.getName()); + + // We're not capturing bodies by default + Assertions.assertNull(span.getAttributes().get(SemanticAttributes.DB_STATEMENT)); + } + + private static class MockSpanExporter implements SpanExporter { + + private final List spans = new ArrayList(); + + @Override + public CompletableResultCode export(Collection spans) { + this.spans.addAll(spans); + synchronized (this) { + notifyAll(); + } + return CompletableResultCode.ofSuccess(); + } + + @Override + public CompletableResultCode flush() { + return CompletableResultCode.ofSuccess(); + } + + @Override + public CompletableResultCode shutdown() { + spans.clear(); + return CompletableResultCode.ofSuccess(); + } + + public List getSpans() { + return spans; + } + + public void reset() { + spans.clear(); + } + + public synchronized void awaitNumSpans(int num, long timeoutMillis) throws InterruptedException { + while(spans.size() < num){ + wait(timeoutMillis); + } + } + } +}