From bad7c59d591b4e46ceb556547c254f9a6ef4285a Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Thu, 17 Mar 2022 16:49:04 +0100 Subject: [PATCH] Raw json support (#200) (#204) --- .gitignore | 3 + docs/index.asciidoc | 1 + docs/loading-json.asciidoc | 77 +++++++ .../java/co/elastic/clients/ApiClient.java | 13 ++ .../_types/AcknowledgedResponseBase.java | 4 +- .../elasticsearch/_types/BaseNode.java | 4 +- .../_types/BulkIndexByScrollFailure.java | 11 +- .../elasticsearch/_types/BulkStats.java | 9 +- .../_types/ClusterStatistics.java | 9 +- .../elasticsearch/_types/CompletionStats.java | 9 +- .../elasticsearch/_types/CoordsGeoBounds.java | 9 +- .../elasticsearch/_types/DocStats.java | 9 +- .../_types/ElasticsearchVersionInfo.java | 11 +- .../elasticsearch/_types/ErrorCause.java | 9 +- .../elasticsearch/_types/ErrorResponse.java | 9 +- .../_types/FieldMemoryUsage.java | 9 +- .../elasticsearch/_types/FieldSizeUsage.java | 9 +- .../elasticsearch/_types/FieldSort.java | 9 +- .../elasticsearch/_types/FielddataStats.java | 9 +- .../elasticsearch/_types/FlushStats.java | 9 +- .../elasticsearch/_types/GeoDistanceSort.java | 9 +- .../elasticsearch/_types/GeoHashLocation.java | 9 +- .../clients/elasticsearch/_types/GeoLine.java | 9 +- .../elasticsearch/_types/GetStats.java | 9 +- .../elasticsearch/_types/IndexingStats.java | 9 +- .../elasticsearch/_types/IndicesOptions.java | 9 +- .../_types/IndicesResponseBase.java | 1 + .../elasticsearch/_types/InlineGet.java | 22 +- .../_types/LatLonGeoLocation.java | 9 +- .../elasticsearch/_types/MergesStats.java | 9 +- .../elasticsearch/_types/NestedSortValue.java | 9 +- .../elasticsearch/_types/NodeAttributes.java | 9 +- .../elasticsearch/_types/NodeShard.java | 9 +- .../elasticsearch/_types/NodeStatistics.java | 9 +- .../elasticsearch/_types/PluginStats.java | 9 +- .../elasticsearch/_types/QueryCacheStats.java | 9 +- .../elasticsearch/_types/RecoveryStats.java | 9 +- .../elasticsearch/_types/RefreshStats.java | 9 +- .../elasticsearch/_types/RequestBase.java | 4 +- .../_types/RequestCacheStats.java | 9 +- .../clients/elasticsearch/_types/Retries.java | 9 +- .../elasticsearch/_types/ScoreSort.java | 9 +- .../elasticsearch/_types/ScriptBase.java | 4 +- .../elasticsearch/_types/ScriptField.java | 9 +- .../elasticsearch/_types/ScriptSort.java | 9 +- .../elasticsearch/_types/ScriptTransform.java | 9 +- .../elasticsearch/_types/SearchStats.java | 9 +- .../elasticsearch/_types/SearchTransform.java | 9 +- .../elasticsearch/_types/SegmentsStats.java | 9 +- .../elasticsearch/_types/ShardFailure.java | 9 +- .../elasticsearch/_types/ShardStatistics.java | 9 +- .../_types/ShardsOperationResponseBase.java | 4 +- .../elasticsearch/_types/SlicedScroll.java | 9 +- .../elasticsearch/_types/SortOptions.java | 8 +- .../elasticsearch/_types/StoreStats.java | 9 +- .../elasticsearch/_types/StoredScript.java | 9 +- .../_types/TopLeftBottomRightGeoBounds.java | 11 +- .../_types/TopRightBottomLeftGeoBounds.java | 11 +- .../elasticsearch/_types/Transform.java | 8 +- .../elasticsearch/_types/TranslogStats.java | 9 +- .../elasticsearch/_types/WarmerStats.java | 9 +- .../elasticsearch/_types/WktGeoBounds.java | 9 +- .../_types/WriteResponseBase.java | 4 +- .../_types/aggregations/AggregateBase.java | 4 +- .../_types/aggregations/Aggregation.java | 8 +- .../_types/aggregations/AggregationBase.java | 4 +- .../_types/aggregations/AggregationRange.java | 9 +- .../aggregations/ArrayPercentilesItem.java | 11 +- .../aggregations/BucketAggregationBase.java | 1 + .../aggregations/ChiSquareHeuristic.java | 11 +- .../ClassificationInferenceOptions.java | 11 +- .../CompositeAggregationSource.java | 11 +- .../aggregations/DateRangeExpression.java | 11 +- .../aggregations/EwmaModelSettings.java | 9 +- .../_types/aggregations/ExtendedBounds.java | 22 +- .../aggregations/ExtendedStatsAggregate.java | 1 + .../FormatMetricAggregationBase.java | 1 + .../FormattableMetricAggregation.java | 1 + .../aggregations/GeoLineAggregation.java | 11 +- .../_types/aggregations/GeoLinePoint.java | 9 +- .../_types/aggregations/GeoLineSort.java | 9 +- .../GoogleNormalizedDistanceHeuristic.java | 11 +- .../_types/aggregations/HdrMethod.java | 9 +- .../_types/aggregations/HistogramOrder.java | 9 +- .../aggregations/HoltLinearModelSettings.java | 11 +- .../HoltWintersModelSettings.java | 11 +- .../InferenceClassImportance.java | 11 +- .../_types/aggregations/InferenceConfig.java | 9 +- .../InferenceFeatureImportance.java | 11 +- .../aggregations/InferenceTopClassEntry.java | 11 +- .../aggregations/IpRangeAggregationRange.java | 11 +- .../aggregations/MatrixAggregation.java | 1 + .../aggregations/MatrixStatsFields.java | 9 +- .../aggregations/MetricAggregationBase.java | 4 +- .../MovingAverageAggregation.java | 10 +- .../MovingAverageAggregationBase.java | 1 + .../MultiBucketAggregateBase.java | 1 + .../_types/aggregations/MultiBucketBase.java | 4 +- .../_types/aggregations/MultiTermLookup.java | 9 +- .../MutualInformationHeuristic.java | 11 +- .../PercentilesAggregateBase.java | 1 + .../aggregations/PipelineAggregationBase.java | 1 + .../_types/aggregations/RangeAggregate.java | 1 + .../RegressionInferenceOptions.java | 11 +- .../aggregations/ScriptedHeuristic.java | 9 +- .../SignificantTermsBucketBase.java | 1 + .../SingleBucketAggregateBase.java | 1 + .../SingleMetricAggregateBase.java | 1 + .../aggregations/StandardDeviationBounds.java | 11 +- .../StandardDeviationBoundsAsString.java | 11 +- .../_types/aggregations/StatsAggregate.java | 1 + .../_types/aggregations/TDigest.java | 9 +- .../aggregations/TermsAggregateBase.java | 1 + .../_types/aggregations/TermsBucketBase.java | 1 + .../_types/aggregations/TermsPartition.java | 9 +- .../_types/aggregations/TestPopulation.java | 9 +- .../_types/aggregations/TopMetrics.java | 9 +- .../_types/aggregations/TopMetricsValue.java | 9 +- .../VariableWidthHistogramAggregation.java | 11 +- .../aggregations/WeightedAverageValue.java | 11 +- .../_types/analysis/Analyzer.java | 8 +- .../_types/analysis/CharFilterBase.java | 4 +- .../_types/analysis/CharFilterDefinition.java | 10 +- .../analysis/CompoundWordTokenFilterBase.java | 1 + .../_types/analysis/CustomAnalyzer.java | 9 +- .../_types/analysis/CustomNormalizer.java | 9 +- .../_types/analysis/DutchAnalyzer.java | 9 +- .../_types/analysis/FingerprintAnalyzer.java | 11 +- .../_types/analysis/IcuAnalyzer.java | 9 +- .../_types/analysis/KeywordAnalyzer.java | 9 +- .../_types/analysis/KuromojiAnalyzer.java | 9 +- .../_types/analysis/LanguageAnalyzer.java | 9 +- .../_types/analysis/LowercaseNormalizer.java | 10 +- .../_types/analysis/NoriAnalyzer.java | 9 +- .../_types/analysis/Normalizer.java | 8 +- .../_types/analysis/PatternAnalyzer.java | 9 +- .../_types/analysis/SimpleAnalyzer.java | 9 +- .../_types/analysis/SnowballAnalyzer.java | 9 +- .../_types/analysis/StandardAnalyzer.java | 9 +- .../_types/analysis/StopAnalyzer.java | 9 +- .../_types/analysis/TokenFilterBase.java | 4 +- .../analysis/TokenFilterDefinition.java | 10 +- .../_types/analysis/TokenizerBase.java | 4 +- .../_types/analysis/TokenizerDefinition.java | 10 +- .../_types/analysis/WhitespaceAnalyzer.java | 11 +- .../_types/mapping/AllField.java | 9 +- .../_types/mapping/CorePropertyBase.java | 1 + .../mapping/DenseVectorIndexOptions.java | 11 +- .../_types/mapping/DocValuesPropertyBase.java | 1 + .../_types/mapping/DynamicTemplate.java | 9 +- .../_types/mapping/FieldMapping.java | 9 +- .../_types/mapping/FieldNamesField.java | 9 +- .../_types/mapping/IndexField.java | 9 +- .../_types/mapping/NumberPropertyBase.java | 1 + .../_types/mapping/Property.java | 8 +- .../_types/mapping/PropertyBase.java | 4 +- .../_types/mapping/RangePropertyBase.java | 1 + .../_types/mapping/RoutingField.java | 9 +- .../_types/mapping/RuntimeField.java | 9 +- .../_types/mapping/SizeField.java | 9 +- .../_types/mapping/SourceField.java | 9 +- .../mapping/StandardNumberProperty.java | 1 + .../_types/mapping/SuggestContext.java | 9 +- .../_types/mapping/TextIndexPrefixes.java | 9 +- .../_types/mapping/TypeMapping.java | 9 +- .../_types/query_dsl/DecayFunctionBase.java | 1 + .../_types/query_dsl/DecayPlacement.java | 9 +- .../_types/query_dsl/FieldAndFormat.java | 9 +- .../_types/query_dsl/FieldLookup.java | 9 +- .../_types/query_dsl/FunctionScore.java | 8 +- .../_types/query_dsl/GeoPolygonPoints.java | 9 +- .../_types/query_dsl/GeoShapeFieldQuery.java | 11 +- .../_types/query_dsl/Intervals.java | 8 +- .../_types/query_dsl/IntervalsAllOf.java | 9 +- .../_types/query_dsl/IntervalsAnyOf.java | 9 +- .../_types/query_dsl/IntervalsFilter.java | 8 +- .../_types/query_dsl/IntervalsFuzzy.java | 9 +- .../_types/query_dsl/IntervalsMatch.java | 9 +- .../_types/query_dsl/IntervalsPrefix.java | 9 +- .../_types/query_dsl/IntervalsWildcard.java | 9 +- .../_types/query_dsl/LikeDocument.java | 9 +- .../_types/query_dsl/PinnedDoc.java | 9 +- .../elasticsearch/_types/query_dsl/Query.java | 8 +- .../_types/query_dsl/QueryBase.java | 4 +- .../_types/query_dsl/RangeQueryBase.java | 1 + .../_types/query_dsl/RankFeatureFunction.java | 4 +- .../RankFeatureFunctionLogarithm.java | 11 +- .../RankFeatureFunctionSaturation.java | 11 +- .../query_dsl/RankFeatureFunctionSigmoid.java | 11 +- .../_types/query_dsl/ScoreFunctionBase.java | 4 +- .../_types/query_dsl/ShapeFieldQuery.java | 9 +- .../_types/query_dsl/SpanQuery.java | 8 +- .../_types/query_dsl/TermsLookup.java | 9 +- .../async_search/AsyncSearch.java | 22 +- .../AsyncSearchDocumentResponseBase.java | 1 + .../async_search/AsyncSearchResponseBase.java | 4 +- .../AsyncSearchStatusResponse.java | 5 +- .../async_search/GetAsyncSearchResponse.java | 5 +- .../async_search/SubmitRequest.java | 9 +- .../async_search/SubmitResponse.java | 5 +- .../autoscaling/AutoscalingPolicy.java | 4 +- .../GetAutoscalingCapacityResponse.java | 11 +- .../PutAutoscalingPolicyRequest.java | 20 +- .../AutoscalingCapacity.java | 11 +- .../AutoscalingDecider.java | 11 +- .../AutoscalingDeciders.java | 11 +- .../AutoscalingNode.java | 9 +- .../AutoscalingResources.java | 11 +- .../elasticsearch/cat/AliasesResponse.java | 19 +- .../elasticsearch/cat/AllocationResponse.java | 21 +- .../elasticsearch/cat/CatRequestBase.java | 4 +- .../elasticsearch/cat/CountResponse.java | 19 +- .../elasticsearch/cat/FielddataResponse.java | 19 +- .../elasticsearch/cat/HealthResponse.java | 19 +- .../elasticsearch/cat/HelpResponse.java | 19 +- .../elasticsearch/cat/IndicesResponse.java | 19 +- .../elasticsearch/cat/MasterResponse.java | 19 +- .../cat/MlDataFrameAnalyticsResponse.java | 21 +- .../cat/MlDatafeedsResponse.java | 21 +- .../elasticsearch/cat/MlJobsResponse.java | 19 +- .../cat/MlTrainedModelsResponse.java | 21 +- .../elasticsearch/cat/NodeattrsResponse.java | 19 +- .../elasticsearch/cat/NodesResponse.java | 19 +- .../cat/PendingTasksResponse.java | 21 +- .../elasticsearch/cat/PluginsResponse.java | 19 +- .../elasticsearch/cat/RecoveryResponse.java | 19 +- .../cat/RepositoriesResponse.java | 21 +- .../elasticsearch/cat/SegmentsResponse.java | 19 +- .../elasticsearch/cat/ShardsResponse.java | 19 +- .../elasticsearch/cat/SnapshotsResponse.java | 19 +- .../elasticsearch/cat/TasksResponse.java | 19 +- .../elasticsearch/cat/TemplatesResponse.java | 19 +- .../elasticsearch/cat/ThreadPoolResponse.java | 21 +- .../elasticsearch/cat/TransformsResponse.java | 21 +- .../cat/aliases/AliasesRecord.java | 9 +- .../cat/allocation/AllocationRecord.java | 9 +- .../elasticsearch/cat/count/CountRecord.java | 9 +- .../cat/fielddata/FielddataRecord.java | 9 +- .../cat/health/HealthRecord.java | 9 +- .../elasticsearch/cat/help/HelpRecord.java | 9 +- .../cat/indices/IndicesRecord.java | 9 +- .../cat/master/MasterRecord.java | 9 +- .../DataFrameAnalyticsRecord.java | 11 +- .../cat/ml_datafeeds/DatafeedsRecord.java | 9 +- .../elasticsearch/cat/ml_jobs/JobsRecord.java | 9 +- .../TrainedModelsRecord.java | 11 +- .../cat/nodeattrs/NodeAttributesRecord.java | 11 +- .../elasticsearch/cat/nodes/NodesRecord.java | 9 +- .../cat/pending_tasks/PendingTasksRecord.java | 11 +- .../cat/plugins/PluginsRecord.java | 9 +- .../cat/recovery/RecoveryRecord.java | 9 +- .../cat/repositories/RepositoriesRecord.java | 11 +- .../cat/segments/SegmentsRecord.java | 9 +- .../cat/shards/ShardsRecord.java | 9 +- .../cat/snapshots/SnapshotsRecord.java | 9 +- .../elasticsearch/cat/tasks/TasksRecord.java | 9 +- .../cat/templates/TemplatesRecord.java | 9 +- .../cat/thread_pool/ThreadPoolRecord.java | 9 +- .../cat/transforms/TransformsRecord.java | 9 +- .../elasticsearch/ccr/CcrStatsResponse.java | 9 +- .../elasticsearch/ccr/FollowIndexStats.java | 9 +- .../elasticsearch/ccr/FollowInfoResponse.java | 11 +- .../elasticsearch/ccr/FollowRequest.java | 9 +- .../elasticsearch/ccr/FollowResponse.java | 9 +- .../ccr/FollowStatsResponse.java | 11 +- .../ccr/ForgetFollowerRequest.java | 11 +- .../ccr/ForgetFollowerResponse.java | 11 +- .../ccr/GetAutoFollowPatternResponse.java | 11 +- .../ccr/PutAutoFollowPatternRequest.java | 11 +- .../elasticsearch/ccr/ReadException.java | 9 +- .../ccr/ResumeFollowRequest.java | 11 +- .../clients/elasticsearch/ccr/ShardStats.java | 9 +- .../ccr/follow_info/FollowerIndex.java | 9 +- .../follow_info/FollowerIndexParameters.java | 11 +- .../AutoFollowPattern.java | 9 +- .../AutoFollowPatternSummary.java | 11 +- .../ccr/stats/AutoFollowStats.java | 9 +- .../ccr/stats/AutoFollowedCluster.java | 11 +- .../elasticsearch/ccr/stats/FollowStats.java | 9 +- .../cluster/AllocationExplainRequest.java | 11 +- .../cluster/AllocationExplainResponse.java | 11 +- .../cluster/ComponentTemplate.java | 9 +- .../cluster/ComponentTemplateNode.java | 11 +- .../cluster/ComponentTemplateSummary.java | 11 +- .../cluster/GetClusterSettingsResponse.java | 11 +- .../cluster/GetComponentTemplateResponse.java | 11 +- .../elasticsearch/cluster/HealthResponse.java | 9 +- .../cluster/PendingTasksResponse.java | 11 +- .../cluster/PutClusterSettingsRequest.java | 11 +- .../cluster/PutClusterSettingsResponse.java | 11 +- .../cluster/PutComponentTemplateRequest.java | 11 +- .../elasticsearch/cluster/RerouteRequest.java | 9 +- .../cluster/RerouteResponse.java | 9 +- .../elasticsearch/cluster/StateResponse.java | 18 +- .../AllocationDecision.java | 11 +- .../allocation_explain/AllocationStore.java | 9 +- .../allocation_explain/ClusterInfo.java | 9 +- .../allocation_explain/CurrentNode.java | 9 +- .../cluster/allocation_explain/DiskUsage.java | 9 +- .../NodeAllocationExplanation.java | 11 +- .../allocation_explain/NodeDiskUsage.java | 9 +- .../allocation_explain/ReservedSize.java | 9 +- .../UnassignedInformation.java | 11 +- .../cluster/health/IndexHealthStats.java | 9 +- .../cluster/health/ShardHealthStats.java | 9 +- .../cluster/pending_tasks/PendingTask.java | 9 +- .../remote_info/ClusterRemoteInfo.java | 8 +- .../remote_info/ClusterRemoteProxyInfo.java | 11 +- .../remote_info/ClusterRemoteSniffInfo.java | 11 +- .../cluster/reroute/Command.java | 9 +- .../reroute/CommandAllocatePrimaryAction.java | 11 +- .../reroute/CommandAllocateReplicaAction.java | 11 +- .../cluster/reroute/CommandCancelAction.java | 11 +- .../cluster/reroute/CommandMoveAction.java | 9 +- .../cluster/reroute/RerouteDecision.java | 9 +- .../cluster/reroute/RerouteExplanation.java | 11 +- .../cluster/reroute/RerouteParameters.java | 9 +- .../cluster/stats/CharFilterTypes.java | 9 +- .../cluster/stats/ClusterFileSystem.java | 9 +- .../cluster/stats/ClusterIndices.java | 9 +- .../cluster/stats/ClusterIndicesShards.java | 11 +- .../stats/ClusterIndicesShardsIndex.java | 11 +- .../cluster/stats/ClusterIngest.java | 9 +- .../cluster/stats/ClusterJvm.java | 9 +- .../cluster/stats/ClusterJvmMemory.java | 9 +- .../cluster/stats/ClusterJvmVersion.java | 9 +- .../cluster/stats/ClusterNetworkTypes.java | 11 +- .../cluster/stats/ClusterNodeCount.java | 9 +- .../cluster/stats/ClusterNodes.java | 9 +- .../cluster/stats/ClusterOperatingSystem.java | 11 +- .../ClusterOperatingSystemArchitecture.java | 11 +- .../stats/ClusterOperatingSystemName.java | 11 +- .../ClusterOperatingSystemPrettyName.java | 11 +- .../cluster/stats/ClusterProcess.java | 9 +- .../cluster/stats/ClusterProcessCpu.java | 9 +- .../ClusterProcessOpenFileDescriptors.java | 11 +- .../cluster/stats/ClusterProcessor.java | 9 +- .../cluster/stats/ClusterShardMetrics.java | 11 +- .../cluster/stats/FieldTypes.java | 9 +- .../cluster/stats/FieldTypesMappings.java | 11 +- .../cluster/stats/IndicesVersions.java | 9 +- .../cluster/stats/NodePackagingType.java | 9 +- .../stats/OperatingSystemMemoryInfo.java | 11 +- .../cluster/stats/RuntimeFieldTypes.java | 9 +- .../elasticsearch/core/BulkResponse.java | 9 +- .../core/ClearScrollRequest.java | 11 +- .../core/ClearScrollResponse.java | 11 +- .../core/ClosePointInTimeRequest.java | 11 +- .../core/ClosePointInTimeResponse.java | 11 +- .../elasticsearch/core/CountRequest.java | 9 +- .../elasticsearch/core/CountResponse.java | 9 +- .../elasticsearch/core/CreateRequest.java | 30 ++- .../core/DeleteByQueryRequest.java | 11 +- .../core/DeleteByQueryResponse.java | 11 +- .../elasticsearch/core/ExplainRequest.java | 9 +- .../elasticsearch/core/ExplainResponse.java | 14 +- .../elasticsearch/core/FieldCapsRequest.java | 9 +- .../elasticsearch/core/FieldCapsResponse.java | 9 +- .../elasticsearch/core/GetResponse.java | 5 +- .../core/GetScriptContextResponse.java | 11 +- .../core/GetScriptLanguagesResponse.java | 11 +- .../elasticsearch/core/GetScriptResponse.java | 9 +- .../elasticsearch/core/GetSourceResponse.java | 20 +- .../elasticsearch/core/IndexRequest.java | 32 ++- .../elasticsearch/core/InfoResponse.java | 9 +- .../elasticsearch/core/MgetRequest.java | 9 +- .../elasticsearch/core/MgetResponse.java | 16 +- .../elasticsearch/core/MsearchResponse.java | 5 +- .../core/MsearchTemplateResponse.java | 5 +- .../core/MtermvectorsRequest.java | 11 +- .../core/MtermvectorsResponse.java | 11 +- .../core/OpenPointInTimeResponse.java | 11 +- .../elasticsearch/core/PutScriptRequest.java | 9 +- .../elasticsearch/core/RankEvalRequest.java | 9 +- .../elasticsearch/core/RankEvalResponse.java | 9 +- .../elasticsearch/core/ReindexRequest.java | 9 +- .../elasticsearch/core/ReindexResponse.java | 9 +- .../core/ReindexRethrottleResponse.java | 11 +- .../core/RenderSearchTemplateRequest.java | 11 +- .../core/RenderSearchTemplateResponse.java | 11 +- .../core/ScriptsPainlessExecuteRequest.java | 11 +- .../core/ScriptsPainlessExecuteResponse.java | 14 +- .../elasticsearch/core/ScrollRequest.java | 9 +- .../elasticsearch/core/ScrollResponse.java | 5 +- .../elasticsearch/core/SearchRequest.java | 9 +- .../elasticsearch/core/SearchResponse.java | 9 +- .../core/SearchShardsResponse.java | 11 +- .../core/SearchTemplateRequest.java | 11 +- .../core/SearchTemplateResponse.java | 14 +- .../elasticsearch/core/TermsEnumRequest.java | 9 +- .../elasticsearch/core/TermsEnumResponse.java | 9 +- .../core/TermvectorsRequest.java | 20 +- .../core/TermvectorsResponse.java | 11 +- .../core/UpdateByQueryRequest.java | 11 +- .../core/UpdateByQueryResponse.java | 11 +- .../core/UpdateByQueryRethrottleResponse.java | 11 +- .../elasticsearch/core/UpdateRequest.java | 23 ++- .../elasticsearch/core/UpdateResponse.java | 5 +- .../core/bulk/BulkOperation.java | 8 +- .../core/bulk/BulkOperationBase.java | 4 +- .../core/bulk/BulkResponseItem.java | 9 +- .../elasticsearch/core/bulk/UpdateAction.java | 23 ++- .../core/bulk/WriteOperation.java | 1 + .../core/explain/Explanation.java | 9 +- .../core/explain/ExplanationDetail.java | 9 +- .../core/field_caps/FieldCapability.java | 9 +- .../elasticsearch/core/get/GetResult.java | 15 +- .../core/get_script_context/Context.java | 9 +- .../get_script_context/ContextMethod.java | 9 +- .../ContextMethodParam.java | 11 +- .../get_script_languages/LanguageContext.java | 9 +- .../core/mget/MultiGetError.java | 9 +- .../core/mget/MultiGetOperation.java | 9 +- .../core/msearch/MultiSearchItem.java | 11 +- .../core/msearch/MultiSearchResult.java | 4 +- .../core/msearch/MultisearchBody.java | 9 +- .../core/msearch/MultisearchHeader.java | 9 +- .../core/msearch_template/TemplateConfig.java | 9 +- .../MultiTermVectorsOperation.java | 11 +- .../mtermvectors/MultiTermVectorsResult.java | 11 +- .../core/rank_eval/DocumentRating.java | 9 +- .../core/rank_eval/RankEvalHit.java | 9 +- .../core/rank_eval/RankEvalHitItem.java | 9 +- .../core/rank_eval/RankEvalMetric.java | 9 +- .../core/rank_eval/RankEvalMetricBase.java | 4 +- .../core/rank_eval/RankEvalMetricDetail.java | 11 +- .../RankEvalMetricRatingTreshold.java | 1 + .../core/rank_eval/RankEvalQuery.java | 9 +- .../core/rank_eval/RankEvalRequestItem.java | 11 +- .../core/rank_eval/UnratedDocument.java | 9 +- .../core/reindex/Destination.java | 9 +- .../core/reindex/RemoteSource.java | 9 +- .../elasticsearch/core/reindex/Source.java | 9 +- .../reindex_rethrottle/ReindexStatus.java | 9 +- .../core/reindex_rethrottle/ReindexTask.java | 9 +- .../PainlessContextSetup.java | 11 +- .../core/search/AggregationBreakdown.java | 11 +- .../core/search/AggregationProfile.java | 11 +- .../core/search/AggregationProfileDebug.java | 11 +- .../AggregationProfileDelegateDebug.java | 11 +- ...AggregationProfileDelegateDebugFilter.java | 9 +- .../elasticsearch/core/search/Collector.java | 9 +- .../core/search/CompletionContext.java | 9 +- .../core/search/CompletionSuggest.java | 11 +- .../core/search/CompletionSuggestOption.java | 20 +- .../core/search/DirectGenerator.java | 9 +- .../core/search/FetchProfile.java | 9 +- .../core/search/FetchProfileBreakdown.java | 11 +- .../core/search/FetchProfileDebug.java | 9 +- .../core/search/FieldCollapse.java | 9 +- .../core/search/FieldSuggester.java | 8 +- .../elasticsearch/core/search/Highlight.java | 9 +- .../core/search/HighlightField.java | 9 +- .../elasticsearch/core/search/Hit.java | 22 +- .../core/search/HitsMetadata.java | 22 +- .../elasticsearch/core/search/InnerHits.java | 9 +- .../core/search/InnerHitsResult.java | 9 +- .../core/search/LaplaceSmoothingModel.java | 11 +- .../LinearInterpolationSmoothingModel.java | 11 +- .../core/search/NestedIdentity.java | 9 +- .../core/search/PhraseSuggestCollate.java | 11 +- .../search/PhraseSuggestCollateQuery.java | 11 +- .../core/search/PhraseSuggestHighlight.java | 11 +- .../core/search/PhraseSuggestOption.java | 11 +- .../core/search/PointInTimeReference.java | 11 +- .../elasticsearch/core/search/Profile.java | 9 +- .../core/search/QueryBreakdown.java | 9 +- .../core/search/QueryProfile.java | 9 +- .../elasticsearch/core/search/Rescore.java | 9 +- .../core/search/RescoreQuery.java | 9 +- .../core/search/SearchProfile.java | 9 +- .../core/search/ShardProfile.java | 9 +- .../core/search/SmoothingModel.java | 8 +- .../core/search/SourceFilter.java | 9 +- .../search/StupidBackoffSmoothingModel.java | 11 +- .../core/search/SuggestBase.java | 4 +- .../core/search/SuggestFuzziness.java | 9 +- .../elasticsearch/core/search/Suggester.java | 9 +- .../core/search/SuggesterBase.java | 4 +- .../core/search/TermSuggestOption.java | 9 +- .../elasticsearch/core/search/TotalHits.java | 9 +- .../core/search_shards/ShardStoreIndex.java | 9 +- .../core/termvectors/FieldStatistics.java | 9 +- .../core/termvectors/Filter.java | 9 +- .../elasticsearch/core/termvectors/Term.java | 9 +- .../core/termvectors/TermVector.java | 9 +- .../elasticsearch/core/termvectors/Token.java | 9 +- .../ListDanglingIndicesResponse.java | 11 +- .../list_dangling_indices/DanglingIndex.java | 9 +- .../enrich/EnrichConfiguration.java | 11 +- .../elasticsearch/enrich/EnrichPolicy.java | 9 +- .../enrich/EnrichStatsResponse.java | 11 +- .../elasticsearch/enrich/EnrichSummary.java | 9 +- .../enrich/ExecutePolicyResponse.java | 11 +- .../enrich/GetPolicyResponse.java | 9 +- .../enrich/PutPolicyRequest.java | 9 +- .../ExecuteEnrichPolicyStatus.java | 11 +- .../enrich/stats/CacheStats.java | 9 +- .../enrich/stats/CoordinatorStats.java | 9 +- .../enrich/stats/ExecutingPolicy.java | 9 +- .../elasticsearch/eql/EqlGetResponse.java | 5 +- .../clients/elasticsearch/eql/EqlHits.java | 22 +- .../elasticsearch/eql/EqlSearchRequest.java | 9 +- .../elasticsearch/eql/EqlSearchResponse.java | 5 +- .../eql/EqlSearchResponseBase.java | 4 +- .../eql/GetEqlStatusResponse.java | 11 +- .../clients/elasticsearch/eql/HitsEvent.java | 22 +- .../elasticsearch/eql/HitsSequence.java | 22 +- .../elasticsearch/features/Feature.java | 9 +- .../features/GetFeaturesResponse.java | 11 +- .../features/ResetFeaturesResponse.java | 11 +- .../elasticsearch/graph/Connection.java | 9 +- .../elasticsearch/graph/ExploreControls.java | 9 +- .../elasticsearch/graph/ExploreRequest.java | 9 +- .../elasticsearch/graph/ExploreResponse.java | 9 +- .../clients/elasticsearch/graph/Hop.java | 9 +- .../elasticsearch/graph/SampleDiversity.java | 9 +- .../clients/elasticsearch/graph/Vertex.java | 9 +- .../elasticsearch/graph/VertexDefinition.java | 9 +- .../elasticsearch/graph/VertexInclude.java | 9 +- .../ilm/ExplainLifecycleResponse.java | 11 +- .../ilm/GetIlmStatusResponse.java | 11 +- .../clients/elasticsearch/ilm/IlmPolicy.java | 9 +- .../ilm/MigrateToDataTiersRequest.java | 11 +- .../ilm/MigrateToDataTiersResponse.java | 11 +- .../elasticsearch/ilm/MoveToStepRequest.java | 9 +- .../clients/elasticsearch/ilm/Phase.java | 9 +- .../clients/elasticsearch/ilm/Phases.java | 9 +- .../ilm/PutLifecycleRequest.java | 11 +- .../ilm/RemovePolicyResponse.java | 11 +- .../explain_lifecycle/LifecycleExplain.java | 8 +- .../LifecycleExplainManaged.java | 11 +- .../LifecycleExplainPhaseExecution.java | 11 +- .../LifecycleExplainUnmanaged.java | 11 +- .../ilm/get_lifecycle/Lifecycle.java | 9 +- .../ilm/move_to_step/StepKey.java | 9 +- .../clients/elasticsearch/indices/Alias.java | 9 +- .../indices/AliasDefinition.java | 9 +- .../elasticsearch/indices/AnalyzeRequest.java | 9 +- .../indices/AnalyzeResponse.java | 9 +- .../indices/CloneIndexRequest.java | 9 +- .../indices/CreateIndexRequest.java | 11 +- .../indices/CreateIndexResponse.java | 11 +- .../elasticsearch/indices/DataStream.java | 9 +- .../indices/DataStreamsStatsResponse.java | 11 +- .../indices/DiskUsageResponse.java | 18 +- .../indices/FielddataFrequencyFilter.java | 11 +- .../indices/GetDataStreamResponse.java | 11 +- .../indices/GetIndexTemplateResponse.java | 11 +- .../indices/GetUpgradeResponse.java | 11 +- .../elasticsearch/indices/IndexRouting.java | 9 +- .../indices/IndexRoutingAllocation.java | 11 +- .../indices/IndexRoutingAllocationDisk.java | 11 +- .../IndexRoutingAllocationInclude.java | 11 +- ...IndexRoutingAllocationInitialRecovery.java | 9 +- .../indices/IndexRoutingRebalance.java | 11 +- .../indices/IndexSegmentSort.java | 9 +- .../indices/IndexSettingBlocks.java | 11 +- .../elasticsearch/indices/IndexSettings.java | 9 +- .../indices/IndexSettingsAnalysis.java | 11 +- .../indices/IndexSettingsLifecycle.java | 11 +- .../elasticsearch/indices/IndexState.java | 9 +- .../indices/IndexVersioning.java | 9 +- .../indices/IndicesStatsResponse.java | 11 +- .../indices/NumericFielddata.java | 9 +- .../indices/OverlappingIndexTemplate.java | 11 +- .../indices/PromoteDataStreamResponse.java | 20 +- .../indices/PutAliasRequest.java | 9 +- .../indices/PutIndexTemplateRequest.java | 11 +- .../indices/PutIndicesSettingsRequest.java | 20 +- .../indices/PutMappingRequest.java | 9 +- .../indices/PutTemplateRequest.java | 11 +- .../ReloadSearchAnalyzersResponse.java | 11 +- .../indices/ResolveIndexResponse.java | 11 +- .../indices/RolloverRequest.java | 9 +- .../indices/SegmentsResponse.java | 9 +- .../indices/ShardStoresResponse.java | 11 +- .../elasticsearch/indices/ShrinkRequest.java | 9 +- .../indices/SimulateIndexTemplateRequest.java | 11 +- .../indices/SimulateTemplateRequest.java | 20 +- .../indices/SimulateTemplateResponse.java | 11 +- .../elasticsearch/indices/SoftDeletes.java | 9 +- .../elasticsearch/indices/SplitRequest.java | 9 +- .../indices/TemplateMapping.java | 9 +- .../indices/UpdateAliasesRequest.java | 11 +- .../indices/ValidateQueryRequest.java | 11 +- .../indices/ValidateQueryResponse.java | 11 +- .../indices/add_block/IndicesBlockStatus.java | 11 +- .../indices/analyze/AnalyzeDetail.java | 9 +- .../indices/analyze/AnalyzeToken.java | 9 +- .../indices/analyze/AnalyzerDetail.java | 9 +- .../indices/analyze/CharFilterDetail.java | 9 +- .../indices/analyze/ExplainAnalyzeToken.java | 11 +- .../indices/analyze/TokenDetail.java | 9 +- .../indices/close/CloseIndexResult.java | 9 +- .../indices/close/CloseShardResult.java | 9 +- .../DataStreamsStatsItem.java | 11 +- .../indices/get_alias/IndexAliases.java | 9 +- .../IndicesGetDataStreamItem.java | 11 +- .../IndicesGetDataStreamItemIndex.java | 11 +- ...ndicesGetDataStreamItemTimestampField.java | 9 +- .../get_field_mapping/TypeFieldMappings.java | 9 +- .../get_index_template/IndexTemplate.java | 9 +- .../get_index_template/IndexTemplateItem.java | 9 +- .../IndexTemplateSummary.java | 11 +- .../get_mapping/IndexMappingRecord.java | 11 +- .../IndexTemplateMapping.java | 11 +- .../indices/recovery/FileDetails.java | 9 +- .../indices/recovery/RecoveryBytes.java | 9 +- .../indices/recovery/RecoveryFiles.java | 9 +- .../indices/recovery/RecoveryIndexStatus.java | 11 +- .../indices/recovery/RecoveryOrigin.java | 9 +- .../indices/recovery/RecoveryStartStatus.java | 11 +- .../indices/recovery/RecoveryStatus.java | 9 +- .../indices/recovery/ShardRecovery.java | 9 +- .../indices/recovery/TranslogStatus.java | 9 +- .../indices/recovery/VerifyIndex.java | 9 +- .../ReloadDetails.java | 9 +- .../resolve_index/ResolveIndexAliasItem.java | 11 +- .../ResolveIndexDataStreamsItem.java | 11 +- .../resolve_index/ResolveIndexItem.java | 9 +- .../indices/rollover/RolloverConditions.java | 11 +- .../indices/segments/IndexSegment.java | 9 +- .../indices/segments/Segment.java | 9 +- .../indices/segments/ShardSegmentRouting.java | 11 +- .../indices/segments/ShardsSegment.java | 9 +- .../shard_stores/IndicesShardStores.java | 11 +- .../indices/shard_stores/ShardStore.java | 9 +- .../shard_stores/ShardStoreException.java | 11 +- .../shard_stores/ShardStoreWrapper.java | 9 +- .../simulate_template/Overlapping.java | 9 +- .../indices/simulate_template/Template.java | 9 +- .../indices/stats/IndexStats.java | 9 +- .../indices/stats/IndicesStats.java | 9 +- .../indices/stats/ShardCommit.java | 9 +- .../indices/stats/ShardFileSizeInfo.java | 9 +- .../indices/stats/ShardLease.java | 9 +- .../indices/stats/ShardPath.java | 9 +- .../indices/stats/ShardQueryCache.java | 9 +- .../indices/stats/ShardRetentionLeases.java | 11 +- .../indices/stats/ShardRouting.java | 9 +- .../indices/stats/ShardSequenceNumber.java | 11 +- .../indices/stats/ShardStats.java | 9 +- .../indices/stats/ShardsTotalStats.java | 9 +- .../indices/update_aliases/Action.java | 8 +- .../indices/update_aliases/AddAction.java | 9 +- .../indices/update_aliases/RemoveAction.java | 9 +- .../update_aliases/RemoveIndexAction.java | 9 +- .../IndicesValidationExplanation.java | 11 +- .../ingest/GeoIpStatsResponse.java | 11 +- .../elasticsearch/ingest/InferenceConfig.java | 9 +- .../ingest/InferenceConfigRegression.java | 11 +- .../elasticsearch/ingest/Pipeline.java | 9 +- .../elasticsearch/ingest/Processor.java | 8 +- .../elasticsearch/ingest/ProcessorBase.java | 4 +- .../ingest/ProcessorGrokResponse.java | 11 +- .../ingest/PutPipelineRequest.java | 11 +- .../elasticsearch/ingest/SimulateRequest.java | 9 +- .../ingest/SimulateResponse.java | 9 +- .../geo_ip_stats/GeoIpDownloadStatistics.java | 11 +- .../geo_ip_stats/GeoIpNodeDatabaseName.java | 11 +- .../geo_ip_stats/GeoIpNodeDatabases.java | 11 +- .../ingest/simulate/Document.java | 9 +- .../ingest/simulate/DocumentSimulation.java | 11 +- .../elasticsearch/ingest/simulate/Ingest.java | 9 +- .../ingest/simulate/PipelineSimulation.java | 11 +- .../license/GetBasicStatusResponse.java | 11 +- .../license/GetLicenseResponse.java | 11 +- .../license/GetTrialStatusResponse.java | 11 +- .../elasticsearch/license/License.java | 9 +- .../elasticsearch/license/PostRequest.java | 9 +- .../elasticsearch/license/PostResponse.java | 9 +- .../license/get/LicenseInformation.java | 11 +- .../license/post/Acknowledgement.java | 9 +- .../logstash/GetPipelineResponse.java | 21 +- .../elasticsearch/logstash/Pipeline.java | 9 +- .../logstash/PipelineMetadata.java | 9 +- .../logstash/PipelineSettings.java | 9 +- .../logstash/PutPipelineRequest.java | 20 +- .../migration/DeprecationsResponse.java | 11 +- .../GetFeatureUpgradeStatusResponse.java | 11 +- .../migration/PostFeatureUpgradeResponse.java | 11 +- .../migration/deprecations/Deprecation.java | 9 +- .../MigrationFeature.java | 9 +- .../MigrationFeatureIndexInfo.java | 11 +- .../MigrationFeature.java | 9 +- .../elasticsearch/ml/AnalysisConfig.java | 9 +- .../elasticsearch/ml/AnalysisConfigRead.java | 11 +- .../elasticsearch/ml/AnalysisLimits.java | 9 +- .../elasticsearch/ml/AnalysisMemoryLimit.java | 11 +- .../clients/elasticsearch/ml/Anomaly.java | 9 +- .../elasticsearch/ml/AnomalyCause.java | 9 +- .../elasticsearch/ml/BucketInfluencer.java | 9 +- .../elasticsearch/ml/BucketSummary.java | 9 +- .../elasticsearch/ml/CalendarEvent.java | 9 +- .../ml/CategorizationAnalyzerDefinition.java | 11 +- .../clients/elasticsearch/ml/Category.java | 9 +- .../elasticsearch/ml/ChunkingConfig.java | 9 +- .../elasticsearch/ml/CloseJobRequest.java | 9 +- .../elasticsearch/ml/CloseJobResponse.java | 9 +- .../clients/elasticsearch/ml/DataCounts.java | 9 +- .../elasticsearch/ml/DataDescription.java | 9 +- .../clients/elasticsearch/ml/Datafeed.java | 9 +- .../elasticsearch/ml/DatafeedConfig.java | 9 +- .../ml/DatafeedRunningState.java | 11 +- .../elasticsearch/ml/DatafeedStats.java | 9 +- .../elasticsearch/ml/DatafeedTimingStats.java | 11 +- .../elasticsearch/ml/DataframeAnalysis.java | 8 +- .../ml/DataframeAnalysisAnalyzedFields.java | 11 +- .../ml/DataframeAnalysisBase.java | 4 +- .../ml/DataframeAnalysisFeatureProcessor.java | 10 +- ...ysisFeatureProcessorFrequencyEncoding.java | 9 +- ...AnalysisFeatureProcessorMultiEncoding.java | 9 +- ...AnalysisFeatureProcessorNGramEncoding.java | 9 +- ...nalysisFeatureProcessorOneHotEncoding.java | 9 +- ...sisFeatureProcessorTargetMeanEncoding.java | 9 +- .../ml/DataframeAnalysisOutlierDetection.java | 11 +- .../elasticsearch/ml/DataframeAnalytics.java | 11 +- .../ml/DataframeAnalyticsDestination.java | 11 +- .../ml/DataframeAnalyticsFieldSelection.java | 11 +- .../DataframeAnalyticsMemoryEstimation.java | 11 +- .../ml/DataframeAnalyticsSource.java | 11 +- .../ml/DataframeAnalyticsStats.java | 10 +- .../ml/DataframeAnalyticsStatsDataCounts.java | 11 +- ...ataframeAnalyticsStatsHyperparameters.java | 9 +- .../DataframeAnalyticsStatsMemoryUsage.java | 11 +- ...taframeAnalyticsStatsOutlierDetection.java | 9 +- .../ml/DataframeAnalyticsStatsProgress.java | 11 +- .../ml/DataframeAnalyticsSummary.java | 11 +- .../elasticsearch/ml/DataframeEvaluation.java | 10 +- .../ml/DataframeEvaluationClassification.java | 11 +- ...EvaluationClassificationMetricsAucRoc.java | 9 +- .../ml/DataframeEvaluationMetrics.java | 4 +- .../DataframeEvaluationOutlierDetection.java | 9 +- .../ml/DataframeEvaluationRegression.java | 11 +- .../DataframeEvaluationRegressionMetrics.java | 9 +- ...frameEvaluationRegressionMetricsHuber.java | 9 +- ...aframeEvaluationRegressionMetricsMsle.java | 9 +- .../ml/DelayedDataCheckConfig.java | 11 +- .../ml/DeleteCalendarJobResponse.java | 11 +- .../ml/DeleteExpiredDataRequest.java | 11 +- .../ml/DeleteExpiredDataResponse.java | 11 +- .../elasticsearch/ml/DetectionRule.java | 9 +- .../clients/elasticsearch/ml/Detector.java | 9 +- .../elasticsearch/ml/DetectorRead.java | 9 +- .../elasticsearch/ml/DiscoveryNode.java | 9 +- .../ml/EstimateModelMemoryRequest.java | 11 +- .../ml/EstimateModelMemoryResponse.java | 11 +- .../ml/EvaluateDataFrameRequest.java | 11 +- .../ml/EvaluateDataFrameResponse.java | 11 +- .../ml/ExplainDataFrameAnalyticsRequest.java | 11 +- .../ml/ExplainDataFrameAnalyticsResponse.java | 11 +- .../clients/elasticsearch/ml/Filter.java | 9 +- .../clients/elasticsearch/ml/FilterRef.java | 9 +- .../elasticsearch/ml/FlushJobRequest.java | 9 +- .../elasticsearch/ml/FlushJobResponse.java | 9 +- .../elasticsearch/ml/ForecastRequest.java | 9 +- .../elasticsearch/ml/GetBucketsRequest.java | 9 +- .../elasticsearch/ml/GetBucketsResponse.java | 11 +- .../ml/GetCalendarEventsResponse.java | 11 +- .../elasticsearch/ml/GetCalendarsRequest.java | 11 +- .../ml/GetCalendarsResponse.java | 11 +- .../ml/GetCategoriesRequest.java | 11 +- .../ml/GetCategoriesResponse.java | 11 +- .../ml/GetDataFrameAnalyticsResponse.java | 11 +- .../GetDataFrameAnalyticsStatsResponse.java | 11 +- .../ml/GetDatafeedStatsResponse.java | 11 +- .../ml/GetDatafeedsResponse.java | 11 +- .../elasticsearch/ml/GetFiltersResponse.java | 11 +- .../ml/GetInfluencersRequest.java | 11 +- .../ml/GetInfluencersResponse.java | 11 +- .../elasticsearch/ml/GetJobStatsResponse.java | 11 +- .../elasticsearch/ml/GetJobsResponse.java | 9 +- .../ml/GetModelSnapshotsRequest.java | 11 +- .../ml/GetModelSnapshotsResponse.java | 11 +- .../ml/GetOverallBucketsRequest.java | 11 +- .../ml/GetOverallBucketsResponse.java | 11 +- .../elasticsearch/ml/GetRecordsRequest.java | 9 +- .../elasticsearch/ml/GetRecordsResponse.java | 11 +- .../ml/GetTrainedModelsResponse.java | 11 +- .../ml/GetTrainedModelsStatsResponse.java | 11 +- .../elasticsearch/ml/Hyperparameter.java | 9 +- .../elasticsearch/ml/Hyperparameters.java | 9 +- .../clients/elasticsearch/ml/Influence.java | 9 +- .../clients/elasticsearch/ml/Influencer.java | 9 +- .../elastic/clients/elasticsearch/ml/Job.java | 9 +- .../clients/elasticsearch/ml/JobBlocked.java | 9 +- .../clients/elasticsearch/ml/JobConfig.java | 9 +- .../ml/JobForecastStatistics.java | 11 +- .../elasticsearch/ml/JobStatistics.java | 9 +- .../clients/elasticsearch/ml/JobStats.java | 9 +- .../elasticsearch/ml/JobTimingStats.java | 9 +- .../elasticsearch/ml/MlInfoResponse.java | 9 +- .../elasticsearch/ml/ModelPlotConfig.java | 9 +- .../elasticsearch/ml/ModelSizeStats.java | 9 +- .../elasticsearch/ml/ModelSnapshot.java | 9 +- .../elasticsearch/ml/OpenJobRequest.java | 9 +- .../elasticsearch/ml/OpenJobResponse.java | 9 +- .../ml/OutlierDetectionParameters.java | 11 +- .../elasticsearch/ml/OverallBucket.java | 9 +- .../elasticsearch/ml/OverallBucketJob.java | 9 +- .../clients/elasticsearch/ml/Page.java | 9 +- .../ml/PerPartitionCategorization.java | 11 +- .../ml/PostCalendarEventsRequest.java | 11 +- .../ml/PostCalendarEventsResponse.java | 11 +- .../elasticsearch/ml/PostDataRequest.java | 33 ++- .../elasticsearch/ml/PostDataResponse.java | 9 +- .../ml/PreviewDataFrameAnalyticsRequest.java | 11 +- .../ml/PreviewDataFrameAnalyticsResponse.java | 11 +- .../ml/PreviewDatafeedRequest.java | 11 +- .../ml/PreviewDatafeedResponse.java | 14 +- .../ml/PutCalendarJobResponse.java | 11 +- .../elasticsearch/ml/PutCalendarRequest.java | 11 +- .../elasticsearch/ml/PutCalendarResponse.java | 11 +- .../ml/PutDataFrameAnalyticsRequest.java | 11 +- .../ml/PutDataFrameAnalyticsResponse.java | 11 +- .../elasticsearch/ml/PutDatafeedRequest.java | 11 +- .../elasticsearch/ml/PutDatafeedResponse.java | 11 +- .../elasticsearch/ml/PutFilterRequest.java | 9 +- .../elasticsearch/ml/PutFilterResponse.java | 9 +- .../elasticsearch/ml/PutJobRequest.java | 9 +- .../elasticsearch/ml/PutJobResponse.java | 9 +- .../ml/PutTrainedModelRequest.java | 11 +- .../ml/RevertModelSnapshotRequest.java | 11 +- .../ml/RevertModelSnapshotResponse.java | 11 +- .../elasticsearch/ml/RuleCondition.java | 9 +- .../ml/StartDatafeedRequest.java | 11 +- .../ml/StartDatafeedResponse.java | 11 +- .../ml/StopDataFrameAnalyticsResponse.java | 11 +- .../elasticsearch/ml/StopDatafeedRequest.java | 11 +- .../ml/StopDatafeedResponse.java | 11 +- .../clients/elasticsearch/ml/TimingStats.java | 9 +- .../ml/TotalFeatureImportance.java | 11 +- .../ml/TotalFeatureImportanceClass.java | 11 +- .../ml/TotalFeatureImportanceStatistics.java | 11 +- .../elasticsearch/ml/TrainedModelConfig.java | 4 +- .../ml/TrainedModelConfigInput.java | 11 +- .../ml/TrainedModelConfigMetadata.java | 11 +- .../ml/TrainedModelInferenceStats.java | 11 +- .../elasticsearch/ml/TrainedModelStats.java | 9 +- .../ml/UpdateDataFrameAnalyticsRequest.java | 11 +- .../ml/UpdateDataFrameAnalyticsResponse.java | 11 +- .../ml/UpdateDatafeedRequest.java | 11 +- .../ml/UpdateDatafeedResponse.java | 11 +- .../elasticsearch/ml/UpdateFilterRequest.java | 11 +- .../ml/UpdateFilterResponse.java | 11 +- .../elasticsearch/ml/UpdateJobRequest.java | 9 +- .../elasticsearch/ml/UpdateJobResponse.java | 9 +- .../ml/UpdateModelSnapshotRequest.java | 11 +- .../ml/UpgradeJobSnapshotResponse.java | 11 +- .../ml/ValidateDetectorRequest.java | 20 +- .../elasticsearch/ml/ValidateRequest.java | 9 +- .../elasticsearch/ml/ValidationLoss.java | 9 +- .../ConfusionMatrixItem.java | 11 +- .../ConfusionMatrixPrediction.java | 11 +- .../ConfusionMatrixThreshold.java | 11 +- .../DataframeClassificationSummary.java | 11 +- ...ataframeClassificationSummaryAccuracy.java | 9 +- ...ationSummaryMulticlassConfusionMatrix.java | 9 +- ...taframeClassificationSummaryPrecision.java | 9 +- .../DataframeClassificationSummaryRecall.java | 9 +- ...frameEvaluationSummaryAucRocCurveItem.java | 9 +- .../DataframeEvaluationValue.java | 4 +- .../DataframeOutlierDetectionSummary.java | 11 +- .../DataframeRegressionSummary.java | 11 +- .../ml/get_calendars/Calendar.java | 9 +- .../ml/info/AnomalyDetectors.java | 9 +- .../elasticsearch/ml/info/Datafeeds.java | 9 +- .../elasticsearch/ml/info/Defaults.java | 9 +- .../clients/elasticsearch/ml/info/Limits.java | 9 +- .../elasticsearch/ml/info/NativeCode.java | 9 +- .../DataframePreviewConfig.java | 11 +- .../ml/put_trained_model/AggregateOutput.java | 9 +- .../ml/put_trained_model/Definition.java | 9 +- .../ml/put_trained_model/Ensemble.java | 9 +- .../FrequencyEncodingPreprocessor.java | 11 +- .../ml/put_trained_model/Input.java | 9 +- .../OneHotEncodingPreprocessor.java | 11 +- .../ml/put_trained_model/Preprocessor.java | 8 +- .../TargetMeanEncodingPreprocessor.java | 11 +- .../ml/put_trained_model/TrainedModel.java | 9 +- .../put_trained_model/TrainedModelTree.java | 9 +- .../TrainedModelTreeNode.java | 11 +- .../ml/put_trained_model/Weights.java | 9 +- .../monitoring/BulkResponse.java | 9 +- .../nodes/AdaptiveSelection.java | 9 +- .../clients/elasticsearch/nodes/Breaker.java | 9 +- .../clients/elasticsearch/nodes/Cgroup.java | 9 +- .../elasticsearch/nodes/CgroupCpu.java | 9 +- .../elasticsearch/nodes/CgroupCpuStat.java | 9 +- .../elasticsearch/nodes/CgroupMemory.java | 9 +- .../clients/elasticsearch/nodes/Client.java | 9 +- .../nodes/ClusterAppliedStats.java | 11 +- .../nodes/ClusterStateQueue.java | 9 +- .../nodes/ClusterStateUpdate.java | 11 +- .../clients/elasticsearch/nodes/Context.java | 9 +- .../clients/elasticsearch/nodes/Cpu.java | 9 +- .../clients/elasticsearch/nodes/CpuAcct.java | 9 +- .../elasticsearch/nodes/DataPathStats.java | 9 +- .../elasticsearch/nodes/Discovery.java | 9 +- .../elasticsearch/nodes/FileSystem.java | 9 +- .../elasticsearch/nodes/FileSystemTotal.java | 9 +- .../elasticsearch/nodes/GarbageCollector.java | 9 +- .../nodes/GarbageCollectorTotal.java | 11 +- .../nodes/HotThreadsResponse.java | 11 +- .../clients/elasticsearch/nodes/Http.java | 9 +- .../elasticsearch/nodes/IndexingPressure.java | 9 +- .../nodes/IndexingPressureMemory.java | 11 +- .../clients/elasticsearch/nodes/Ingest.java | 9 +- .../elasticsearch/nodes/IngestTotal.java | 9 +- .../elasticsearch/nodes/IoStatDevice.java | 9 +- .../clients/elasticsearch/nodes/IoStats.java | 9 +- .../clients/elasticsearch/nodes/Jvm.java | 9 +- .../elasticsearch/nodes/JvmClasses.java | 9 +- .../elasticsearch/nodes/JvmMemoryStats.java | 9 +- .../elasticsearch/nodes/JvmThreads.java | 9 +- .../elasticsearch/nodes/KeyedProcessor.java | 9 +- .../elasticsearch/nodes/MemoryStats.java | 4 +- .../elasticsearch/nodes/NodeBufferPool.java | 9 +- .../elasticsearch/nodes/NodeReloadError.java | 9 +- .../nodes/NodesResponseBase.java | 4 +- .../elasticsearch/nodes/OperatingSystem.java | 9 +- .../clients/elasticsearch/nodes/Pool.java | 9 +- .../elasticsearch/nodes/PressureMemory.java | 9 +- .../clients/elasticsearch/nodes/Process.java | 9 +- .../elasticsearch/nodes/Processor.java | 9 +- .../nodes/PublishedClusterStates.java | 11 +- .../elasticsearch/nodes/Recording.java | 9 +- .../nodes/ReloadSecureSettingsRequest.java | 11 +- .../nodes/RepositoryLocation.java | 11 +- .../nodes/RepositoryMeteringInformation.java | 11 +- .../elasticsearch/nodes/RequestCounts.java | 9 +- .../elasticsearch/nodes/ScriptCache.java | 9 +- .../elasticsearch/nodes/Scripting.java | 9 +- .../nodes/SerializedClusterState.java | 11 +- .../nodes/SerializedClusterStateDetail.java | 11 +- .../clients/elasticsearch/nodes/Stats.java | 9 +- .../elasticsearch/nodes/ThreadCount.java | 9 +- .../elasticsearch/nodes/Transport.java | 9 +- .../nodes/TransportHistogram.java | 11 +- .../nodes/hot_threads/HotThread.java | 9 +- .../nodes/info/DeprecationIndexing.java | 11 +- .../elasticsearch/nodes/info/NodeInfo.java | 9 +- .../nodes/info/NodeInfoAction.java | 9 +- .../nodes/info/NodeInfoAggregation.java | 11 +- .../nodes/info/NodeInfoBootstrap.java | 9 +- .../nodes/info/NodeInfoClient.java | 9 +- .../nodes/info/NodeInfoDiscover.java | 9 +- .../nodes/info/NodeInfoHttp.java | 9 +- .../nodes/info/NodeInfoIngest.java | 9 +- .../nodes/info/NodeInfoIngestDownloader.java | 11 +- .../nodes/info/NodeInfoIngestInfo.java | 11 +- .../nodes/info/NodeInfoIngestProcessor.java | 11 +- .../nodes/info/NodeInfoJvmMemory.java | 9 +- .../nodes/info/NodeInfoMemory.java | 9 +- .../nodes/info/NodeInfoNetwork.java | 9 +- .../nodes/info/NodeInfoNetworkInterface.java | 11 +- .../nodes/info/NodeInfoOSCPU.java | 9 +- .../nodes/info/NodeInfoPath.java | 9 +- .../nodes/info/NodeInfoRepositories.java | 11 +- .../nodes/info/NodeInfoRepositoriesUrl.java | 11 +- .../nodes/info/NodeInfoScript.java | 9 +- .../nodes/info/NodeInfoSearch.java | 9 +- .../nodes/info/NodeInfoSearchRemote.java | 11 +- .../nodes/info/NodeInfoSettings.java | 9 +- .../nodes/info/NodeInfoSettingsCluster.java | 11 +- .../info/NodeInfoSettingsClusterElection.java | 11 +- .../nodes/info/NodeInfoSettingsHttp.java | 11 +- .../nodes/info/NodeInfoSettingsHttpType.java | 11 +- .../nodes/info/NodeInfoSettingsIngest.java | 11 +- .../nodes/info/NodeInfoSettingsNetwork.java | 11 +- .../nodes/info/NodeInfoSettingsNode.java | 11 +- .../nodes/info/NodeInfoSettingsTransport.java | 11 +- .../NodeInfoSettingsTransportFeatures.java | 11 +- .../info/NodeInfoSettingsTransportType.java | 11 +- .../nodes/info/NodeInfoTransport.java | 9 +- .../nodes/info/NodeInfoXpack.java | 9 +- .../nodes/info/NodeInfoXpackLicense.java | 11 +- .../nodes/info/NodeInfoXpackLicenseType.java | 11 +- .../nodes/info/NodeInfoXpackSecurity.java | 11 +- .../info/NodeInfoXpackSecurityAuthc.java | 11 +- .../NodeInfoXpackSecurityAuthcRealms.java | 11 +- ...odeInfoXpackSecurityAuthcRealmsStatus.java | 9 +- .../info/NodeInfoXpackSecurityAuthcToken.java | 11 +- .../nodes/info/NodeInfoXpackSecuritySsl.java | 11 +- .../elasticsearch/nodes/info/NodeJvmInfo.java | 9 +- .../nodes/info/NodeOperatingSystemInfo.java | 11 +- .../nodes/info/NodeProcessInfo.java | 9 +- .../nodes/info/NodeThreadPoolInfo.java | 11 +- .../elasticsearch/nodes/usage/NodeUsage.java | 9 +- .../rollup/DateHistogramGrouping.java | 11 +- .../elasticsearch/rollup/FieldMetric.java | 9 +- .../elasticsearch/rollup/GetJobsResponse.java | 9 +- .../elasticsearch/rollup/Groupings.java | 9 +- .../rollup/HistogramGrouping.java | 9 +- .../elasticsearch/rollup/PutJobRequest.java | 9 +- .../elasticsearch/rollup/RollupRequest.java | 18 +- .../elasticsearch/rollup/RollupResponse.java | 18 +- .../rollup/RollupSearchRequest.java | 11 +- .../rollup/RollupSearchResponse.java | 14 +- .../rollup/StartJobResponse.java | 9 +- .../elasticsearch/rollup/StopJobResponse.java | 9 +- .../elasticsearch/rollup/TermsGrouping.java | 9 +- .../rollup/delete_job/TaskFailure.java | 9 +- .../rollup/delete_job/TaskFailureReason.java | 9 +- .../rollup/get_jobs/RollupJob.java | 9 +- .../get_jobs/RollupJobConfiguration.java | 11 +- .../rollup/get_jobs/RollupJobStats.java | 9 +- .../rollup/get_jobs/RollupJobStatus.java | 9 +- .../get_rollup_caps/RollupCapabilities.java | 11 +- .../RollupCapabilitySummary.java | 11 +- .../IndexCapabilities.java | 9 +- .../RollupJobSummary.java | 9 +- .../RollupJobSummaryField.java | 11 +- .../CacheStatsResponse.java | 11 +- .../ClearCacheResponse.java | 20 +- .../searchable_snapshots/MountRequest.java | 9 +- .../searchable_snapshots/MountResponse.java | 9 +- .../SearchableSnapshotsStatsResponse.java | 11 +- .../cache_stats/Node.java | 9 +- .../cache_stats/Shared.java | 9 +- .../mount/MountedSnapshot.java | 9 +- .../ApplicationGlobalUserPrivileges.java | 11 +- .../security/ApplicationPrivileges.java | 11 +- .../security/AuthenticateResponse.java | 11 +- .../security/ChangePasswordRequest.java | 11 +- .../security/ClearApiKeyCacheResponse.java | 11 +- .../ClearCachedPrivilegesResponse.java | 11 +- .../security/ClearCachedRealmsResponse.java | 11 +- .../security/ClearCachedRolesResponse.java | 11 +- .../ClearCachedServiceTokensResponse.java | 11 +- .../elasticsearch/security/ClusterNode.java | 9 +- .../security/CreateApiKeyRequest.java | 11 +- .../security/CreateApiKeyResponse.java | 11 +- .../security/CreateServiceTokenResponse.java | 11 +- .../elasticsearch/security/CreatedStatus.java | 9 +- .../security/DeleteRoleMappingResponse.java | 11 +- .../security/DeleteRoleResponse.java | 11 +- .../security/DeleteServiceTokenResponse.java | 11 +- .../security/DeleteUserResponse.java | 11 +- .../elasticsearch/security/FieldRule.java | 8 +- .../elasticsearch/security/FieldSecurity.java | 9 +- .../security/GetApiKeyResponse.java | 9 +- .../GetBuiltinPrivilegesResponse.java | 11 +- .../GetServiceCredentialsResponse.java | 11 +- .../security/GetTokenRequest.java | 9 +- .../security/GetTokenResponse.java | 9 +- .../security/GetUserPrivilegesResponse.java | 11 +- .../security/GlobalPrivilege.java | 9 +- .../security/GrantApiKeyRequest.java | 11 +- .../security/GrantApiKeyResponse.java | 11 +- .../security/HasPrivilegesRequest.java | 11 +- .../security/HasPrivilegesResponse.java | 11 +- .../security/IndicesPrivileges.java | 44 ++-- .../security/InvalidateApiKeyRequest.java | 11 +- .../security/InvalidateApiKeyResponse.java | 11 +- .../security/InvalidateTokenRequest.java | 11 +- .../security/InvalidateTokenResponse.java | 11 +- .../security/ManageUserPrivileges.java | 11 +- .../security/PutPrivilegesRequest.java | 22 +- .../security/PutRoleMappingRequest.java | 11 +- .../security/PutRoleMappingResponse.java | 11 +- .../security/PutRoleRequest.java | 9 +- .../security/PutRoleResponse.java | 9 +- .../security/PutUserRequest.java | 9 +- .../security/PutUserResponse.java | 9 +- .../clients/elasticsearch/security/Realm.java | 9 +- .../elasticsearch/security/RealmInfo.java | 9 +- .../elasticsearch/security/RoleMapping.java | 9 +- .../security/RoleMappingRule.java | 8 +- .../clients/elasticsearch/security/User.java | 4 +- .../security/authenticate/ApiKey.java | 9 +- .../security/authenticate/ServiceToken.java | 9 +- .../create_api_key/IndexPrivileges.java | 9 +- .../create_api_key/RoleDescriptor.java | 9 +- .../security/create_service_token/Token.java | 9 +- .../delete_privileges/FoundStatus.java | 9 +- .../security/get_api_key/ApiKey.java | 9 +- .../elasticsearch/security/get_role/Role.java | 9 +- .../security/get_role/RoleTemplate.java | 9 +- .../security/get_role/TransientMetadata.java | 9 +- .../get_service_accounts/RoleDescriptor.java | 9 +- .../RoleDescriptorWrapper.java | 11 +- .../get_token/AuthenticationProvider.java | 11 +- .../security/get_token/UserRealm.java | 9 +- .../security/grant_api_key/ApiKey.java | 9 +- .../ApplicationPrivilegesCheck.java | 11 +- .../has_privileges/IndexPrivilegesCheck.java | 11 +- .../security/put_privileges/Actions.java | 9 +- .../shutdown/GetNodeResponse.java | 9 +- .../shutdown/get_node/NodeShutdownStatus.java | 11 +- .../get_node/PersistentTaskStatus.java | 11 +- .../shutdown/get_node/PluginsStatus.java | 9 +- .../get_node/ShardMigrationStatus.java | 11 +- .../slm/ExecuteLifecycleResponse.java | 11 +- .../slm/GetSlmStatusResponse.java | 11 +- .../elasticsearch/slm/GetStatsResponse.java | 9 +- .../clients/elasticsearch/slm/InProgress.java | 9 +- .../clients/elasticsearch/slm/Invocation.java | 9 +- .../slm/PutLifecycleRequest.java | 11 +- .../clients/elasticsearch/slm/Retention.java | 9 +- .../elasticsearch/slm/SlmConfiguration.java | 9 +- .../clients/elasticsearch/slm/SlmPolicy.java | 9 +- .../elasticsearch/slm/SnapshotLifecycle.java | 9 +- .../clients/elasticsearch/slm/Statistics.java | 9 +- .../snapshot/CleanupRepositoryResponse.java | 11 +- .../snapshot/CloneSnapshotRequest.java | 11 +- .../snapshot/CreateRepositoryRequest.java | 11 +- .../snapshot/CreateSnapshotRequest.java | 11 +- .../snapshot/CreateSnapshotResponse.java | 11 +- .../snapshot/FileCountSnapshotStats.java | 11 +- .../snapshot/GetSnapshotResponse.java | 11 +- .../elasticsearch/snapshot/IndexDetails.java | 9 +- .../snapshot/InfoFeatureState.java | 9 +- .../elasticsearch/snapshot/Repository.java | 9 +- .../snapshot/RepositorySettings.java | 11 +- .../snapshot/RestoreRequest.java | 9 +- .../snapshot/RestoreResponse.java | 9 +- .../elasticsearch/snapshot/ShardsStats.java | 9 +- .../snapshot/ShardsStatsSummary.java | 11 +- .../snapshot/ShardsStatsSummaryItem.java | 11 +- .../snapshot/SnapshotIndexStats.java | 11 +- .../elasticsearch/snapshot/SnapshotInfo.java | 9 +- .../snapshot/SnapshotShardFailure.java | 11 +- .../snapshot/SnapshotShardsStatus.java | 11 +- .../elasticsearch/snapshot/SnapshotStats.java | 9 +- .../snapshot/SnapshotStatusResponse.java | 11 +- .../elasticsearch/snapshot/Status.java | 9 +- .../snapshot/VerifyRepositoryResponse.java | 11 +- .../CleanupRepositoryResults.java | 11 +- .../snapshot/get/SnapshotResponseItem.java | 11 +- .../snapshot/restore/SnapshotRestore.java | 9 +- .../verify_repository/CompactNodeInfo.java | 9 +- .../elasticsearch/sql/ClearCursorRequest.java | 11 +- .../sql/ClearCursorResponse.java | 11 +- .../elasticsearch/sql/QueryRequest.java | 9 +- .../elasticsearch/sql/QueryResponse.java | 9 +- .../elasticsearch/sql/TranslateRequest.java | 9 +- .../elasticsearch/sql/TranslateResponse.java | 9 +- .../elasticsearch/sql/query/Column.java | 9 +- .../ssl/CertificatesResponse.java | 21 +- .../certificates/CertificateInformation.java | 11 +- .../elasticsearch/tasks/CancelResponse.java | 9 +- .../elasticsearch/tasks/GetTasksResponse.java | 9 +- .../clients/elasticsearch/tasks/Info.java | 9 +- .../elasticsearch/tasks/ListResponse.java | 4 +- .../clients/elasticsearch/tasks/State.java | 9 +- .../clients/elasticsearch/tasks/Status.java | 9 +- .../transform/GetTransformResponse.java | 11 +- .../transform/GetTransformStatsResponse.java | 11 +- .../elasticsearch/transform/Latest.java | 9 +- .../elasticsearch/transform/Pivot.java | 9 +- .../elasticsearch/transform/PivotGroupBy.java | 8 +- .../transform/PreviewTransformRequest.java | 11 +- .../transform/PreviewTransformResponse.java | 14 +- .../transform/PutTransformRequest.java | 11 +- .../transform/RetentionPolicy.java | 8 +- .../elasticsearch/transform/Settings.java | 9 +- .../elasticsearch/transform/Source.java | 9 +- .../clients/elasticsearch/transform/Sync.java | 8 +- .../transform/TimeRetentionPolicy.java | 11 +- .../elasticsearch/transform/TimeSync.java | 9 +- .../transform/UpdateTransformRequest.java | 11 +- .../transform/UpdateTransformResponse.java | 11 +- .../transform/UpgradeTransformsResponse.java | 11 +- .../get_transform/TransformSummary.java | 9 +- .../get_transform_stats/CheckpointStats.java | 9 +- .../get_transform_stats/Checkpointing.java | 9 +- .../TransformIndexerStats.java | 11 +- .../TransformProgress.java | 9 +- .../get_transform_stats/TransformStats.java | 9 +- .../watcher/AckWatchResponse.java | 9 +- .../watcher/AcknowledgeState.java | 9 +- .../clients/elasticsearch/watcher/Action.java | 9 +- .../elasticsearch/watcher/ActionStatus.java | 9 +- .../elasticsearch/watcher/ActionWebhook.java | 9 +- .../watcher/ActivateWatchResponse.java | 11 +- .../watcher/ActivationState.java | 9 +- .../watcher/ActivationStatus.java | 9 +- .../watcher/ArrayCompareCondition.java | 11 +- .../elasticsearch/watcher/ChainInput.java | 9 +- .../watcher/CompareCondition.java | 9 +- .../CompareContextPayloadCondition.java | 11 +- .../elasticsearch/watcher/Condition.java | 8 +- .../elasticsearch/watcher/DailySchedule.java | 9 +- .../watcher/DeactivateWatchResponse.java | 11 +- .../watcher/DeleteWatchResponse.java | 11 +- .../elasticsearch/watcher/EmailResult.java | 9 +- .../watcher/ExecuteWatchRequest.java | 11 +- .../watcher/ExecuteWatchResponse.java | 11 +- .../watcher/ExecutionResult.java | 9 +- .../watcher/ExecutionResultAction.java | 11 +- .../watcher/ExecutionResultCondition.java | 11 +- .../watcher/ExecutionResultInput.java | 11 +- .../elasticsearch/watcher/ExecutionState.java | 9 +- .../watcher/ExecutionThreadPool.java | 11 +- .../watcher/GetWatchResponse.java | 9 +- .../elasticsearch/watcher/HourAndMinute.java | 9 +- .../elasticsearch/watcher/HourlySchedule.java | 9 +- .../elasticsearch/watcher/HttpInput.java | 9 +- .../watcher/HttpInputAuthentication.java | 11 +- .../watcher/HttpInputBasicAuthentication.java | 11 +- .../elasticsearch/watcher/HttpInputProxy.java | 9 +- .../watcher/HttpInputRequestDefinition.java | 4 +- .../watcher/HttpInputResponseResult.java | 11 +- .../clients/elasticsearch/watcher/Index.java | 9 +- .../elasticsearch/watcher/IndexResult.java | 9 +- .../watcher/IndexResultSummary.java | 11 +- .../clients/elasticsearch/watcher/Input.java | 8 +- .../elasticsearch/watcher/Logging.java | 9 +- .../elasticsearch/watcher/LoggingResult.java | 9 +- .../watcher/PagerDutyActionEventResult.java | 11 +- .../watcher/PagerDutyContext.java | 9 +- .../elasticsearch/watcher/PagerDutyEvent.java | 9 +- .../watcher/PagerDutyResult.java | 9 +- .../watcher/PutWatchRequest.java | 9 +- .../watcher/PutWatchResponse.java | 9 +- .../elasticsearch/watcher/QueryWatch.java | 9 +- .../watcher/QueryWatchesRequest.java | 11 +- .../watcher/QueryWatchesResponse.java | 11 +- .../elasticsearch/watcher/Schedule.java | 8 +- .../watcher/ScheduleTriggerEvent.java | 11 +- .../watcher/ScriptCondition.java | 9 +- .../elasticsearch/watcher/SearchInput.java | 9 +- .../watcher/SearchInputRequestBody.java | 11 +- .../watcher/SearchInputRequestDefinition.java | 11 +- .../watcher/SimulatedActions.java | 9 +- .../watcher/SlackAttachment.java | 9 +- .../watcher/SlackAttachmentField.java | 11 +- .../watcher/SlackDynamicAttachment.java | 11 +- .../elasticsearch/watcher/SlackMessage.java | 9 +- .../elasticsearch/watcher/SlackResult.java | 9 +- .../elasticsearch/watcher/ThrottleState.java | 9 +- .../elasticsearch/watcher/TimeOfMonth.java | 9 +- .../elasticsearch/watcher/TimeOfWeek.java | 9 +- .../elasticsearch/watcher/TimeOfYear.java | 9 +- .../elasticsearch/watcher/Trigger.java | 8 +- .../elasticsearch/watcher/TriggerEvent.java | 8 +- .../watcher/TriggerEventResult.java | 11 +- .../clients/elasticsearch/watcher/Watch.java | 9 +- .../elasticsearch/watcher/WatchStatus.java | 9 +- .../watcher/WatcherStatsResponse.java | 11 +- .../elasticsearch/watcher/WebhookResult.java | 9 +- .../watcher/execute_watch/WatchRecord.java | 9 +- .../watcher/stats/WatchRecordQueuedStats.java | 4 +- .../watcher/stats/WatcherNodeStats.java | 9 +- .../xpack/XpackInfoResponse.java | 9 +- .../xpack/XpackUsageResponse.java | 11 +- .../xpack/info/BuildInformation.java | 9 +- .../elasticsearch/xpack/info/Feature.java | 9 +- .../elasticsearch/xpack/info/Features.java | 9 +- .../xpack/info/MinimalLicenseInformation.java | 11 +- .../xpack/info/NativeCodeInformation.java | 11 +- .../elasticsearch/xpack/usage/AllJobs.java | 9 +- .../xpack/usage/AnalyticsStatistics.java | 11 +- .../elasticsearch/xpack/usage/Base.java | 4 +- .../elasticsearch/xpack/usage/Counter.java | 4 +- .../xpack/usage/DataTierPhaseStatistics.java | 11 +- .../elasticsearch/xpack/usage/Datafeed.java | 9 +- .../xpack/usage/EqlFeatures.java | 9 +- .../xpack/usage/EqlFeaturesJoin.java | 9 +- .../xpack/usage/EqlFeaturesKeys.java | 9 +- .../xpack/usage/EqlFeaturesPipes.java | 9 +- .../xpack/usage/EqlFeaturesSequences.java | 11 +- .../xpack/usage/FeatureToggle.java | 4 +- .../elasticsearch/xpack/usage/Ilm.java | 9 +- .../xpack/usage/IlmPolicyStatistics.java | 11 +- .../elasticsearch/xpack/usage/IpFilter.java | 9 +- .../elasticsearch/xpack/usage/Jobs.java | 9 +- .../elasticsearch/xpack/usage/MlCounter.java | 9 +- .../xpack/usage/MlDataFrameAnalyticsJobs.java | 11 +- .../usage/MlDataFrameAnalyticsJobsCount.java | 11 +- .../usage/MlDataFrameAnalyticsJobsMemory.java | 11 +- .../xpack/usage/MlInference.java | 9 +- .../usage/MlInferenceIngestProcessor.java | 11 +- .../MlInferenceIngestProcessorCount.java | 11 +- .../xpack/usage/MlInferenceTrainedModels.java | 11 +- .../usage/MlInferenceTrainedModelsCount.java | 11 +- .../elasticsearch/xpack/usage/RealmCache.java | 9 +- .../xpack/usage/RoleMapping.java | 9 +- .../xpack/usage/RuntimeFieldsType.java | 9 +- .../xpack/usage/SecurityRoles.java | 9 +- .../xpack/usage/SecurityRolesDls.java | 9 +- .../usage/SecurityRolesDlsBitSetCache.java | 11 +- .../xpack/usage/SecurityRolesFile.java | 9 +- .../xpack/usage/SecurityRolesNative.java | 11 +- .../elasticsearch/xpack/usage/Ssl.java | 9 +- .../xpack/usage/WatcherActionTotals.java | 11 +- .../xpack/usage/WatcherActions.java | 9 +- .../xpack/usage/WatcherWatch.java | 9 +- .../xpack/usage/WatcherWatchTrigger.java | 11 +- .../xpack/usage/XpackUsageQuery.java | 9 +- .../clients/json/AttributedJsonpMapper.java | 30 +-- .../clients/json/DelegatingJsonpMapper.java | 61 ++++++ .../co/elastic/clients/json/JsonpMapper.java | 3 + .../clients/json/NamedDeserializer.java | 14 +- .../clients/json/SimpleJsonpMapper.java | 123 +++++++++++ .../co/elastic/clients/json/WithJson.java | 74 +++++++ .../clients/util/ObjectBuilderBase.java | 3 + .../util/WithJsonObjectBuilderBase.java | 68 +++++++ .../documentation/ApiConventionsTest.java | 8 +- ...gTransport.java => DocTestsTransport.java} | 18 +- .../documentation/LoadingJsonTest.java | 192 ++++++++++++++++++ .../elasticsearch/json/JsonDataTest.java | 39 ++++ .../model/ClassStructureTest.java | 18 +- .../elasticsearch/model/ModelTestCase.java | 39 ++-- .../model/SerializationTest.java | 5 +- .../co/elastic/clients/json/WithJsonTest.java | 172 ++++++++++++++++ .../clients/documentation/some-index.json | 10 + 1309 files changed, 11079 insertions(+), 2641 deletions(-) create mode 100644 docs/loading-json.asciidoc create mode 100644 java-client/src/main/java/co/elastic/clients/json/DelegatingJsonpMapper.java create mode 100644 java-client/src/main/java/co/elastic/clients/json/SimpleJsonpMapper.java create mode 100644 java-client/src/main/java/co/elastic/clients/json/WithJson.java create mode 100644 java-client/src/main/java/co/elastic/clients/util/WithJsonObjectBuilderBase.java rename java-client/src/test/java/co/elastic/clients/documentation/{FailingTransport.java => DocTestsTransport.java} (83%) create mode 100644 java-client/src/test/java/co/elastic/clients/documentation/LoadingJsonTest.java create mode 100644 java-client/src/test/java/co/elastic/clients/json/WithJsonTest.java create mode 100644 java-client/src/test/resources/co/elastic/clients/documentation/some-index.json diff --git a/.gitignore b/.gitignore index a31d826de..bbdb39a36 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ gradle-app.setting *.iml .ci/output + +# HTML files produced by the docs build +html_docs diff --git a/docs/index.asciidoc b/docs/index.asciidoc index e76f1fb11..ba413194a 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -25,6 +25,7 @@ include::installation.asciidoc[] include::connecting.asciidoc[] include::migrate.asciidoc[] include::api-conventions.asciidoc[] +include::loading-json.asciidoc[] include::javadoc-and-source.asciidoc[] include::release-notes/index.asciidoc[] diff --git a/docs/loading-json.asciidoc b/docs/loading-json.asciidoc new file mode 100644 index 000000000..c323b5884 --- /dev/null +++ b/docs/loading-json.asciidoc @@ -0,0 +1,77 @@ +[[loading-json]] +== Creating API objects from JSON data + +A common workflow during application development with Elasticsearch is to use the Kibana Developer Console to interactively prepare and test queries, aggregations, index mappings and other complex API calls. This results in working JSON snippets that you may want to use in your application. + +As translating these JSON snippets to Java code can be time-consuming and error-prone, most of the data classes in the {java-client} can be loaded from JSON text: object builders have `withJson()` methods that populate the builder from raw JSON. This also allows you to combine dynamically loaded JSON with programmatic construction of objects. + +Under the hood, the `withJson()` methods call the object's deserializer. The JSON text's structure and value types therefore have to be correct for the target data structure. Using `withJson()` keeps the strong typing guarantees of the {java-client}. + +[discrete] +=== Examples + +[discrete] +==== Loading an index definition from a resource file + +Consider a resource file `some-index.json` containing an index definition: + +["source", "json"] +-------------------------------------------------- +{ + "mappings": { + "properties": { + "field1": { "type": "text" } + } + } +} +-------------------------------------------------- + +You can create an index from that definition as follows: + +["source","java"] +-------------------------------------------------- +include-tagged::{doc-tests}/LoadingJsonTest.java[load-index] +-------------------------------------------------- +<1> open an input stream for the JSON resource file. +<2> populate the index creation request with the resource file contents. + +[discrete] +==== Ingesting documents from JSON files + +Similarly, you can read documents to be stored in {es} from data files: + +["source","java"] +-------------------------------------------------- +include-tagged::{doc-tests}/LoadingJsonTest.java[ingest-data] +-------------------------------------------------- +<1> when calling `withJson()` on data structures that have generic type parameters, these generic types will be considered to be `JsonData`. + +[discrete] +==== Creating a search request combining JSON and programmatic construction + +You can combine `withJson()` with regular calls to setter methods. The example below loads the query part of a search request from a `String` and programmatically adds an aggregation. + +["source","java"] +-------------------------------------------------- +include-tagged::{doc-tests}/LoadingJsonTest.java[query] +-------------------------------------------------- +<1> loads the query from the JSON string. +<2> adds the aggregation. +<3> since this is an aggregation we don't care about result documents and set their target class to `Void`, meaning they will just be ignored. Note that setting `size` to zero actually prevents any document from being returned. + +[discrete] +==== Creating a search request from multiple JSON snippets + +The `withJson()` methods are partial deserializers: the properties loaded from the JSON will set property values or replace the previous ones, but will not reset other properties not found in the JSON input. You can use this to combine multiple JSON snippets to build complex search requests. In the example below, we combine separate definitions of a query that selects some documents and an aggregation that is run on the results of this query. + +["source","java"] +-------------------------------------------------- +include-tagged::{doc-tests}/LoadingJsonTest.java[query-and-agg] +-------------------------------------------------- +<1> set max number of returned document to 100 for queries. +<2> we do not want any matching document in aggregations. +<3> loads the query part of the request. +<4> loads the aggregation part of the request (overwrites `size` from the query). +<5> additional request properties set programmatically. + +Notice that order matters when the JSON snippets have some common properties: just as when setting property values programmatically, the last value that is set for a property overwrites the previous one. diff --git a/java-client/src/main/java/co/elastic/clients/ApiClient.java b/java-client/src/main/java/co/elastic/clients/ApiClient.java index 088cc5c74..7e5d6b342 100644 --- a/java-client/src/main/java/co/elastic/clients/ApiClient.java +++ b/java-client/src/main/java/co/elastic/clients/ApiClient.java @@ -19,6 +19,7 @@ package co.elastic.clients; +import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.transport.TransportOptions; import co.elastic.clients.transport.Transport; import co.elastic.clients.json.JsonpDeserializer; @@ -51,6 +52,9 @@ protected JsonpDeserializer getDeserializer(Class clazz) { */ public abstract Self withTransportOptions(@Nullable TransportOptions transportOptions); + /** + * Get the transport used by this client to handle communication with the server. + */ public T _transport() { return this.transport; } @@ -58,4 +62,13 @@ public T _transport() { public TransportOptions _transportOptions() { return this.transportOptions; } + + /** + * Get the JSON mapper used to map API objects to/from JSON. + *

+ * Shortcut for _transport().jsonpMapper() + */ + public JsonpMapper _jsonpMapper() { + return transport.jsonpMapper(); + } } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/AcknowledgedResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/AcknowledgedResponseBase.java index ad3befd0e..b7f317c5f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/AcknowledgedResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/AcknowledgedResponseBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -83,7 +83,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private Boolean acknowledged; /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BaseNode.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BaseNode.java index e54fc5585..35faf5872 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BaseNode.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BaseNode.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -162,7 +162,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private Map attributes; private String host; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkIndexByScrollFailure.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkIndexByScrollFailure.java index bcd47d10a..667075b23 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkIndexByScrollFailure.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkIndexByScrollFailure.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -143,7 +143,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link BulkIndexByScrollFailure}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ErrorCause cause; private String id; @@ -201,6 +203,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link BulkIndexByScrollFailure}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkStats.java index 40680dce6..b9fcf6cd8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/BulkStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -211,7 +211,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link BulkStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long totalOperations; @Nullable @@ -306,6 +306,11 @@ public final Builder avgSizeInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link BulkStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java index 8af8a4744..1b24e592c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterStatistics.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -115,7 +115,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterStatistics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer skipped; private Integer successful; @@ -146,6 +146,11 @@ public final Builder total(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterStatistics}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CompletionStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CompletionStats.java index 1fa14786c..d70a48ee1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CompletionStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CompletionStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -131,7 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CompletionStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long sizeInBytes; @Nullable @@ -185,6 +185,11 @@ public final Builder fields(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Double top; private Double bottom; @@ -169,6 +169,11 @@ public final Builder right(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CoordsGeoBounds}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DocStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DocStats.java index 2b3183f0f..b37b0bb66 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DocStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/DocStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -108,7 +108,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DocStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long count; @Nullable @@ -130,6 +130,11 @@ public final Builder deleted(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DocStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionInfo.java index eb7f55003..a2c2a1937 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionInfo.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -197,7 +197,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ElasticsearchVersionInfo}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String buildDate; private String buildFlavor; @@ -288,6 +290,11 @@ public final Builder number(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ElasticsearchVersionInfo}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorCause.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorCause.java index 5c7382b28..044051cb3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorCause.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ErrorCause.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -213,7 +213,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ErrorCause}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map metadata = new HashMap<>(); @@ -358,6 +358,11 @@ public final Builder suppressed(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ErrorCause error; private Integer status; @@ -133,6 +133,11 @@ public final Builder status(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ErrorResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldMemoryUsage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldMemoryUsage.java index 91912c185..42fc4ee1d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldMemoryUsage.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldMemoryUsage.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -108,7 +108,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldMemoryUsage}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String memorySize; @@ -130,6 +130,11 @@ public final Builder memorySizeInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldMemoryUsage}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSizeUsage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSizeUsage.java index fada1436a..d6d5878f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSizeUsage.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSizeUsage.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -108,7 +108,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldSizeUsage}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String size; @@ -130,6 +130,11 @@ public final Builder sizeInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldSizeUsage}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSort.java index 7bee5d707..c476361dd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FieldSort.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -209,7 +209,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -343,6 +343,11 @@ public final Builder format(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldSort}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FielddataStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FielddataStats.java index d1abd6d39..302215d8f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FielddataStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FielddataStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -148,7 +148,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FielddataStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Long evictions; @@ -214,6 +214,11 @@ public final Builder fields(String key, return fields(key, fn.apply(new FieldMemoryUsage.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FielddataStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FlushStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FlushStats.java index 2b1529632..0de1abd29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FlushStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/FlushStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FlushStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long periodic; private Long total; @@ -176,6 +176,11 @@ public final Builder totalTimeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FlushStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoDistanceSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoDistanceSort.java index 5525c64ec..9dd135786 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoDistanceSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoDistanceSort.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -197,7 +197,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoDistanceSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; private List location; @@ -288,6 +288,11 @@ public final Builder unit(@Nullable DistanceUnit value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoDistanceSort}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashLocation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashLocation.java index 1349493e3..5c950a6bb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashLocation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoHashLocation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -90,7 +90,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoHashLocation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String geohash; /** @@ -101,6 +101,11 @@ public final Builder geohash(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoHashLocation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoLine.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoLine.java index 36d8b5784..10e126434 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoLine.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GeoLine.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -125,7 +125,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoLine}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String type; private List> coordinates; @@ -164,6 +164,11 @@ public final Builder coordinates(List value, List... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoLine}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java index abb7ab2a0..d2a144954 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/GetStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -221,7 +221,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long current; @Nullable @@ -325,6 +325,11 @@ public final Builder total(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndexingStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndexingStats.java index de5d76e6e..a81ddd57a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndexingStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndexingStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -284,7 +284,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexingStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long indexCurrent; private Long deleteCurrent; @@ -450,6 +450,11 @@ public final Builder types(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -245,6 +245,11 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesOptions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesResponseBase.java index 07ff80d51..79c4daca8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesResponseBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java index c71cb9a7e..9a51e4579 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InlineGet.java @@ -30,11 +30,12 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -53,7 +54,7 @@ * @see API * specification */ - +@JsonpDeserializable public class InlineGet implements JsonpSerializable { private final Map metadata; @@ -205,7 +206,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InlineGet}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { @Nullable private Map metadata = new HashMap<>(); @@ -317,6 +320,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link InlineGet}. * @@ -341,6 +349,14 @@ public static JsonpDeserializer> createInlineGe op -> InlineGet.setupInlineGetDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link InlineGet} based on named deserializers provided + * by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createInlineGetDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_types.TDocument"))); + protected static void setupInlineGetDeserializer(ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LatLonGeoLocation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LatLonGeoLocation.java index 03bf9a10c..a1ad8c8f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LatLonGeoLocation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/LatLonGeoLocation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -102,7 +102,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LatLonGeoLocation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Double lat; private Double lon; @@ -123,6 +123,11 @@ public final Builder lon(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LatLonGeoLocation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java index d5a2353e4..695a96138 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/MergesStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -313,7 +313,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MergesStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long current; private Long currentDocs; @@ -480,6 +480,11 @@ public final Builder totalTimeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MergesStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NestedSortValue.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NestedSortValue.java index 329afcb13..484188e0d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NestedSortValue.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NestedSortValue.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NestedSortValue}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Query filter; @@ -201,6 +201,11 @@ public final Builder path(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NestedSortValue}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeAttributes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeAttributes.java index 0791f561b..68239990b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeAttributes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeAttributes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -186,7 +186,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeAttributes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map attributes; private String ephemeralId; @@ -285,6 +285,11 @@ public final Builder roles(NodeRole value, NodeRole... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeAttributes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java index 0fa7a8df9..7207914a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeShard.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -227,7 +227,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeShard}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ShardRoutingState state; private Boolean primary; @@ -355,6 +355,11 @@ public final Builder relocatingNode(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeShard}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeStatistics.java index db0d2657b..886638e37 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/NodeStatistics.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.List; @@ -145,7 +145,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeStatistics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List failures; @@ -216,6 +216,11 @@ public final Builder failed(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeStatistics}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java index 47a4644e5..3304cd026 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/PluginStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -218,7 +218,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PluginStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String classname; private String description; @@ -331,6 +331,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PluginStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryCacheStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryCacheStats.java index 6d80b44fb..8f2cbe66b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryCacheStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryCacheStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -186,7 +186,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link QueryCacheStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer cacheCount; private Integer cacheSize; @@ -268,6 +268,11 @@ public final Builder totalCount(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link QueryCacheStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RecoveryStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RecoveryStats.java index 13c0e3021..8ec676330 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RecoveryStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RecoveryStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -135,7 +135,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long currentAsSource; private Long currentAsTarget; @@ -177,6 +177,11 @@ public final Builder throttleTimeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RefreshStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RefreshStats.java index 930842394..a1654c928 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RefreshStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RefreshStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -161,7 +161,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RefreshStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long externalTotal; private Long externalTotalTimeInMillis; @@ -223,6 +223,11 @@ public final Builder totalTimeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RefreshStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestBase.java index f63d809df..6840b5234 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestBase.java @@ -28,7 +28,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; @@ -46,7 +46,7 @@ public RequestBase() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { protected abstract BuilderT self(); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestCacheStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestCacheStats.java index 397980309..7057817de 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestCacheStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RequestCacheStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -147,7 +147,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RequestCacheStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long evictions; private Long hitCount; @@ -199,6 +199,11 @@ public final Builder missCount(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RequestCacheStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retries.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retries.java index ec50b462c..3740414cf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retries.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retries.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -102,7 +102,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Retries}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long bulk; private Long search; @@ -123,6 +123,11 @@ public final Builder search(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Retries}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScoreSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScoreSort.java index ae5544584..d620b5ba8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScoreSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScoreSort.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -100,7 +100,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScoreSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SortOrder order; @@ -112,6 +112,11 @@ public final Builder order(@Nullable SortOrder value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ScoreSort}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptBase.java index 3529dbc80..fbfe785f9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -92,7 +92,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Map params; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptField.java index 6058995d1..3f20029d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -108,7 +108,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScriptField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Script script; @Nullable @@ -137,6 +137,11 @@ public final Builder ignoreFailure(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ScriptField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptSort.java index 9f0213417..eb65b6b43 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ScriptSort.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -163,7 +163,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScriptSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SortOrder order; @@ -232,6 +232,11 @@ public final Builder nested(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String lang; private Map params; @@ -155,6 +155,11 @@ public final Builder params(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ScriptTransform}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SearchStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SearchStats.java index 7773f4818..6534e8fd3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SearchStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SearchStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -275,7 +275,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SearchStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long fetchCurrent; private Long fetchTimeInMillis; @@ -439,6 +439,11 @@ public final Builder groups(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private SearchInputRequestDefinition request; private Time timeout; @@ -147,6 +147,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SearchTransform}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SegmentsStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SegmentsStats.java index 55b044f9d..4e9b68bde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SegmentsStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SegmentsStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -453,7 +453,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SegmentsStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer count; @Nullable @@ -727,6 +727,11 @@ public final Builder versionMapMemoryInBytes(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SegmentsStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardFailure.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardFailure.java index 4988c680d..caea0fc43 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardFailure.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardFailure.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -156,7 +156,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardFailure}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String index; @@ -217,6 +217,11 @@ public final Builder status(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardFailure}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardStatistics.java index aa5a12a03..a697cb219 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardStatistics.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Number; import java.util.List; @@ -155,7 +155,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStatistics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Number failed; private Number successful; @@ -229,6 +229,11 @@ public final Builder skipped(@Nullable Number value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStatistics}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardsOperationResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardsOperationResponseBase.java index 5a0ddf2a4..70983197e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardsOperationResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ShardsOperationResponseBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -82,7 +82,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private ShardStatistics shards; /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicedScroll.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicedScroll.java index 72cd19a56..76882c820 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicedScroll.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SlicedScroll.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -121,7 +121,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SlicedScroll}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String field; @@ -153,6 +153,11 @@ public final Builder max(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SlicedScroll}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java index f8da42ae2..9cdf55ec6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import java.lang.Object; @@ -225,10 +225,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder score(ScoreSort v) { this._kind = Kind.Score; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoreStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoreStats.java index 4f2453b71..92d0c156c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoreStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoreStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -173,7 +173,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StoreStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String size; @@ -238,6 +238,11 @@ public final Builder totalDataSetSizeInBytes(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StoreStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoredScript.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoredScript.java index a85176c9a..a6d5818ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoredScript.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StoredScript.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -125,7 +125,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StoredScript}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String lang; @Nullable @@ -169,6 +169,11 @@ public final Builder source(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StoredScript}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TopLeftBottomRightGeoBounds.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TopLeftBottomRightGeoBounds.java index 9a40b5b1d..5cae5ecca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TopLeftBottomRightGeoBounds.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TopLeftBottomRightGeoBounds.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TopLeftBottomRightGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private GeoLocation topLeft; private GeoLocation bottomRight; @@ -138,6 +140,11 @@ public final Builder bottomRight(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private GeoLocation topRight; private GeoLocation bottomLeft; @@ -138,6 +140,11 @@ public final Builder bottomLeft(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder chain(List v) { this._kind = Kind.Chain; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TranslogStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TranslogStats.java index cad8e2651..9f96ef415 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TranslogStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TranslogStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -181,7 +181,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TranslogStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long earliestLastModifiedAge; private Long operations; @@ -254,6 +254,11 @@ public final Builder uncommittedSizeInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TranslogStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WarmerStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WarmerStats.java index 78c3ef968..af5a2a8ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WarmerStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WarmerStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link WarmerStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long current; private Long total; @@ -176,6 +176,11 @@ public final Builder totalTimeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link WarmerStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WktGeoBounds.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WktGeoBounds.java index 3c4e5bf11..066afc23f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WktGeoBounds.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WktGeoBounds.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -90,7 +90,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link WktGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String wkt; /** @@ -101,6 +101,11 @@ public final Builder wkt(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link WktGeoBounds}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java index 04a1c703f..c0a0b256c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -196,7 +196,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private String id; private String index; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBase.java index 39c4ed41d..062e1c94a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -93,7 +93,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Map meta; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java index 0797cf79e..594cd0980 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java @@ -34,9 +34,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.lang.String; @@ -1502,7 +1502,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase { + public static class Builder extends WithJsonObjectBuilderBase { private Kind _kind; private Object _value; @@ -1567,6 +1567,10 @@ public final Builder meta(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } public ContainerBuilder adjacencyMatrix(AdjacencyMatrixAggregation v) { this._kind = Kind.AdjacencyMatrix; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBase.java index 890163618..55fb2f251 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -110,7 +110,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Map meta; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java index 312ae550d..87e0ec369 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationRange.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -129,7 +129,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AggregationRange}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String from; @@ -163,6 +163,11 @@ public final Builder to(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AggregationRange}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java index 9f984565f..07dd21fee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -125,7 +125,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ArrayPercentilesItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String key; private Double value; @@ -159,6 +161,11 @@ public final Builder valueAsString(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ArrayPercentilesItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/BucketAggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/BucketAggregationBase.java index be7edb3d4..be6ff013d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/BucketAggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/BucketAggregationBase.java @@ -28,6 +28,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChiSquareHeuristic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChiSquareHeuristic.java index bf6c7f2c0..b1e5411b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChiSquareHeuristic.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChiSquareHeuristic.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -104,7 +104,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ChiSquareHeuristic}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean backgroundIsSuperset; private Boolean includeNegatives; @@ -125,6 +127,11 @@ public final Builder includeNegatives(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ChiSquareHeuristic}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ClassificationInferenceOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ClassificationInferenceOptions.java index 30ec84a54..cf5d753b5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ClassificationInferenceOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ClassificationInferenceOptions.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -180,7 +180,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClassificationInferenceOptions}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Integer numTopClasses; @@ -251,6 +253,11 @@ public final Builder topClassesResultsField(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClassificationInferenceOptions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CompositeAggregationSource.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CompositeAggregationSource.java index 4ccdf7d44..980f4ca9e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CompositeAggregationSource.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CompositeAggregationSource.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -145,7 +145,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CompositeAggregationSource}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private TermsAggregation terms; @@ -220,6 +222,11 @@ public final Builder geotileGrid( return this.geotileGrid(fn.apply(new GeoTileGridAggregation.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CompositeAggregationSource}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DateRangeExpression.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DateRangeExpression.java index 4bca4838b..c0804955b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DateRangeExpression.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DateRangeExpression.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -129,7 +129,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DateRangeExpression}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private FieldDateMath from; @@ -177,6 +179,11 @@ public final Builder to(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Float alpha; @@ -107,6 +107,11 @@ public final Builder alpha(@Nullable Float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link EwmaModelSettings}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedBounds.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedBounds.java index e4c1bc60c..87d8e6c69 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedBounds.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedBounds.java @@ -29,11 +29,12 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -48,7 +49,7 @@ * "../../doc-files/api-spec.html#_types.aggregations.ExtendedBounds">API * specification */ - +@JsonpDeserializable public class ExtendedBounds implements JsonpSerializable { private final T max; @@ -110,7 +111,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExtendedBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { private T max; private T min; @@ -143,6 +146,11 @@ public final Builder tSerializer(@Nullable JsonpSerializer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExtendedBounds}. * @@ -167,6 +175,14 @@ public static JsonpDeserializer> createExtendedBoundsDeser op -> ExtendedBounds.setupExtendedBoundsDeserializer(op, tDeserializer)); }; + /** + * Json deserializer for {@link ExtendedBounds} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createExtendedBoundsDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_types.aggregations.T"))); + protected static void setupExtendedBoundsDeserializer(ObjectDeserializer> op, JsonpDeserializer tDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedStatsAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedStatsAggregate.java index d4c463654..2803f58e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedStatsAggregate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ExtendedStatsAggregate.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormatMetricAggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormatMetricAggregationBase.java index b3228eab8..f29076bc4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormatMetricAggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormatMetricAggregationBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormattableMetricAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormattableMetricAggregation.java index 009dd93b6..2108b5698 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormattableMetricAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FormattableMetricAggregation.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java index f8da4008e..e59fe98c2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineAggregation.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -165,7 +165,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoLineAggregation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private GeoLinePoint point; private GeoLineSort sort; @@ -233,6 +235,11 @@ public final Builder size(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoLineAggregation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLinePoint.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLinePoint.java index 8a5e3e69e..4e2d7343a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLinePoint.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLinePoint.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoLinePoint}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -102,6 +102,11 @@ public final Builder field(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoLinePoint}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineSort.java index 49ab9ee74..5e92d1507 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GeoLineSort.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoLineSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -102,6 +102,11 @@ public final Builder field(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoLineSort}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java index 17b6cefd6..b45e19072 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/GoogleNormalizedDistanceHeuristic.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -96,7 +96,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GoogleNormalizedDistanceHeuristic}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean backgroundIsSuperset; @@ -108,6 +110,11 @@ public final Builder backgroundIsSuperset(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GoogleNormalizedDistanceHeuristic}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HdrMethod.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HdrMethod.java index 4cd1faabe..6d9033af2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HdrMethod.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HdrMethod.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -95,7 +95,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HdrMethod}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer numberOfSignificantValueDigits; @@ -107,6 +107,11 @@ public final Builder numberOfSignificantValueDigits(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HdrMethod}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HistogramOrder.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HistogramOrder.java index 97d505a4c..e538f8b65 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HistogramOrder.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HistogramOrder.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -110,7 +110,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HistogramOrder}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SortOrder count; @@ -133,6 +133,11 @@ public final Builder key(@Nullable SortOrder value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HistogramOrder}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltLinearModelSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltLinearModelSettings.java index 9e767f2eb..8781f67a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltLinearModelSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltLinearModelSettings.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.util.Objects; @@ -112,7 +112,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HoltLinearModelSettings}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Float alpha; @@ -135,6 +137,11 @@ public final Builder beta(@Nullable Float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HoltLinearModelSettings}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltWintersModelSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltWintersModelSettings.java index 150106248..5c37577b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltWintersModelSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/HoltWintersModelSettings.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Float; @@ -181,7 +181,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HoltWintersModelSettings}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Float alpha; @@ -248,6 +250,11 @@ public final Builder type(@Nullable HoltWintersType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HoltWintersModelSettings}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceClassImportance.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceClassImportance.java index 0dd9fa611..9b6d8a0a6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceClassImportance.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceClassImportance.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InferenceClassImportance}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String className; private Double importance; @@ -126,6 +128,11 @@ public final Builder importance(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InferenceClassImportance}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceConfig.java index 4ed4dfbfd..6b026c6c7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceConfig.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceConfig.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -115,7 +115,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InferenceConfig}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private RegressionInferenceOptions regression; @@ -162,6 +162,11 @@ public final Builder classification( return this.classification(fn.apply(new ClassificationInferenceOptions.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InferenceConfig}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceFeatureImportance.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceFeatureImportance.java index f3db25ee2..53aa47cb6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceFeatureImportance.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceFeatureImportance.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -131,7 +131,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InferenceFeatureImportance}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String featureName; @Nullable @@ -186,6 +188,11 @@ public final Builder classes( return classes(fn.apply(new InferenceClassImportance.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InferenceFeatureImportance}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceTopClassEntry.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceTopClassEntry.java index 00df14356..a3ec82c30 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceTopClassEntry.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/InferenceTopClassEntry.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -118,7 +118,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InferenceTopClassEntry}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private FieldValue className; private Double classProbability; @@ -188,6 +190,11 @@ public final Builder classScore(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InferenceTopClassEntry}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/IpRangeAggregationRange.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/IpRangeAggregationRange.java index c63e2f0f5..1ee16d842 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/IpRangeAggregationRange.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/IpRangeAggregationRange.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -129,7 +129,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IpRangeAggregationRange}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String from; @@ -163,6 +165,11 @@ public final Builder to(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IpRangeAggregationRange}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixAggregation.java index ae2559ad2..dcbaaef0d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixAggregation.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixStatsFields.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixStatsFields.java index be1557954..7efacf3e5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixStatsFields.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MatrixStatsFields.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; @@ -202,7 +202,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MatrixStatsFields}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private Long count; @@ -307,6 +307,11 @@ public final Builder correlation(String key, Double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MatrixStatsFields}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MetricAggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MetricAggregationBase.java index f173bbbb7..fd99135c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MetricAggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MetricAggregationBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -123,7 +123,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String field; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregation.java index fc133a5ef..06894c19a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregation.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -213,10 +213,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Kind _kind; private MovingAverageAggregationVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder ewma(EwmaMovingAverageAggregation v) { this._kind = Kind.Ewma; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregationBase.java index 1377a3fa1..6cdaf671b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MovingAverageAggregationBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketAggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketAggregateBase.java index e12058f54..62a2313bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketAggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketAggregateBase.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketBase.java index 588b6e19f..2fc38a715 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiBucketBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -101,7 +101,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable protected Map aggregations = new HashMap<>(); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiTermLookup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiTermLookup.java index 058cabd6f..b29d09712 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiTermLookup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MultiTermLookup.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultiTermLookup}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -102,6 +102,11 @@ public final Builder field(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultiTermLookup}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MutualInformationHeuristic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MutualInformationHeuristic.java index e6b909881..06de9e515 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MutualInformationHeuristic.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/MutualInformationHeuristic.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -112,7 +112,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MutualInformationHeuristic}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean backgroundIsSuperset; @@ -135,6 +137,11 @@ public final Builder includeNegatives(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MutualInformationHeuristic}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PercentilesAggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PercentilesAggregateBase.java index 0a24526c9..e90f97e2c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PercentilesAggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PercentilesAggregateBase.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PipelineAggregationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PipelineAggregationBase.java index 8a8b23e76..8ec217553 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PipelineAggregationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PipelineAggregationBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RangeAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RangeAggregate.java index bdf5e0f9d..c454b620f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RangeAggregate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RangeAggregate.java @@ -28,6 +28,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RegressionInferenceOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RegressionInferenceOptions.java index 09bef58ad..4e02c1ce8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RegressionInferenceOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/RegressionInferenceOptions.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -119,7 +119,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RegressionInferenceOptions}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String resultsField; @@ -148,6 +150,11 @@ public final Builder numTopFeatureImportanceValues(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RegressionInferenceOptions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ScriptedHeuristic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ScriptedHeuristic.java index eaf191ca9..5000b4413 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ScriptedHeuristic.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ScriptedHeuristic.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScriptedHeuristic}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Script script; /** @@ -109,6 +109,11 @@ public final Builder script(Function> fn) return this.script(fn.apply(new Script.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ScriptedHeuristic}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsBucketBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsBucketBase.java index 83594b919..d49c0c9ce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsBucketBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsBucketBase.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleBucketAggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleBucketAggregateBase.java index 7da9f6ced..b0afc0100 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleBucketAggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleBucketAggregateBase.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleMetricAggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleMetricAggregateBase.java index 788b3e827..50daa2ce0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleMetricAggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SingleMetricAggregateBase.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBounds.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBounds.java index c8a744564..68daba8e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBounds.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBounds.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -163,7 +163,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StandardDeviationBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double upper; private Double lower; @@ -236,6 +238,11 @@ public final Builder lowerSampling(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StandardDeviationBounds}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBoundsAsString.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBoundsAsString.java index 8350274a3..9e5985f3a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBoundsAsString.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StandardDeviationBoundsAsString.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -157,7 +157,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StandardDeviationBoundsAsString}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String upper; private String lower; @@ -218,6 +220,11 @@ public final Builder lowerSampling(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StandardDeviationBoundsAsString}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StatsAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StatsAggregate.java index 80b2d64df..30b0eab20 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StatsAggregate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StatsAggregate.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TDigest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TDigest.java index b244c12ac..9532f9adc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TDigest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TDigest.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -94,7 +94,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TDigest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer compression; @@ -106,6 +106,11 @@ public final Builder compression(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TDigest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsAggregateBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsAggregateBase.java index 36b1f4d2d..2e5bdfdbe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsAggregateBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsAggregateBase.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsBucketBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsBucketBase.java index f35aa0fcb..b69e1ec34 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsBucketBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsBucketBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsPartition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsPartition.java index fce8fce80..5762af9bb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsPartition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TermsPartition.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermsPartition}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long numPartitions; private Long partition; @@ -124,6 +124,11 @@ public final Builder partition(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermsPartition}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TestPopulation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TestPopulation.java index fc1396988..2f4c1146c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TestPopulation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TestPopulation.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -128,7 +128,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TestPopulation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; @Nullable @@ -175,6 +175,11 @@ public final Builder filter(Function> fn) { return this.filter(fn.apply(new Query.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TestPopulation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TopMetrics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TopMetrics.java index e209b79e8..fc81938a9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TopMetrics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TopMetrics.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -123,7 +123,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TopMetrics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List sort; private Map metrics; @@ -186,6 +186,11 @@ public final Builder metrics(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -102,6 +102,11 @@ public final Builder field(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TopMetricsValue}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/VariableWidthHistogramAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/VariableWidthHistogramAggregation.java index 0627288df..2d059b454 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/VariableWidthHistogramAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/VariableWidthHistogramAggregation.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -156,7 +156,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link VariableWidthHistogramAggregation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String field; @@ -201,6 +203,11 @@ public final Builder initialBuffer(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link VariableWidthHistogramAggregation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/WeightedAverageValue.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/WeightedAverageValue.java index ce1367d03..88cb14fc2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/WeightedAverageValue.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/WeightedAverageValue.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -131,7 +131,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link WeightedAverageValue}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String field; @@ -172,6 +174,11 @@ public final Builder script(Function> fn) return this.script(fn.apply(new Script.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link WeightedAverageValue}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java index 8c351d77d..d9eff0938 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -379,10 +379,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private AnalyzerVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder custom(CustomAnalyzer v) { this._kind = Kind.Custom; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterBase.java index 6707bc92f..c38f2ba38 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -86,7 +86,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String version; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterDefinition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterDefinition.java index 5b7a3c0f1..9a08cebcf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterDefinition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CharFilterDefinition.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -215,10 +215,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Kind _kind; private CharFilterDefinitionVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder htmlStrip(HtmlStripCharFilter v) { this._kind = Kind.HtmlStrip; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CompoundWordTokenFilterBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CompoundWordTokenFilterBase.java index 836c375e8..d3954e96f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CompoundWordTokenFilterBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CompoundWordTokenFilterBase.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomAnalyzer.java index 22ec381ad..a54025fc0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -177,7 +177,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CustomAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List charFilter; @@ -256,6 +256,11 @@ public final Builder tokenizer(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CustomAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomNormalizer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomNormalizer.java index f97613b63..4d2d9365f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomNormalizer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CustomNormalizer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -130,7 +130,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CustomNormalizer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List charFilter; @@ -177,6 +177,11 @@ public final Builder filter(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CustomNormalizer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java index 45d88a535..21f83a420 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -110,7 +110,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DutchAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List stopwords; @@ -134,6 +134,11 @@ public final Builder stopwords(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DutchAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FingerprintAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FingerprintAnalyzer.java index 134f143d7..8cef652ac 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FingerprintAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FingerprintAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -185,7 +185,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FingerprintAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String version; @@ -261,6 +263,11 @@ public final Builder stopwordsPath(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FingerprintAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuAnalyzer.java index 4607aa5d1..7e85f4911 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -111,7 +111,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IcuAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private IcuNormalizationType method; private IcuNormalizationMode mode; @@ -132,6 +132,11 @@ public final Builder mode(IcuNormalizationMode value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IcuAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KeywordAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KeywordAnalyzer.java index 9095c1595..799097673 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KeywordAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KeywordAnalyzer.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -105,7 +105,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link KeywordAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -117,6 +117,11 @@ public final Builder version(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link KeywordAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java index c391bb65d..7657fadf1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KuromojiAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link KuromojiAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private KuromojiTokenizationMode mode; @Nullable @@ -140,6 +140,11 @@ public final Builder userDictionary(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link KuromojiAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LanguageAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LanguageAnalyzer.java index 58ddf434c..db2c28b09 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LanguageAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LanguageAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -176,7 +176,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LanguageAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -254,6 +254,11 @@ public final Builder stopwordsPath(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LanguageAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LowercaseNormalizer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LowercaseNormalizer.java index 7e46a3735..a65d276f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LowercaseNormalizer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LowercaseNormalizer.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -84,7 +84,13 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LowercaseNormalizer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } /** * Builds a {@link LowercaseNormalizer}. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NoriAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NoriAnalyzer.java index c118d3b63..a8b6d4aac 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NoriAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NoriAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -159,7 +159,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NoriAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -216,6 +216,11 @@ public final Builder userDictionary(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NoriAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java index 975f93027..3a4dc26a0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -154,10 +154,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private NormalizerVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder custom(CustomNormalizer v) { this._kind = Kind.Custom; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PatternAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PatternAnalyzer.java index d909a97cd..1565b104c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PatternAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PatternAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -175,7 +175,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PatternAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -242,6 +242,11 @@ public final Builder stopwords(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PatternAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimpleAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimpleAnalyzer.java index 3e69150ab..287a3aa80 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimpleAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SimpleAnalyzer.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -105,7 +105,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SimpleAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -117,6 +117,11 @@ public final Builder version(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SimpleAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SnowballAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SnowballAnalyzer.java index c6ae1e2e6..207920898 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SnowballAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SnowballAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -139,7 +139,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SnowballAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -184,6 +184,11 @@ public final Builder stopwords(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SnowballAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StandardAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StandardAnalyzer.java index 732e44933..6b43a67f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StandardAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StandardAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -128,7 +128,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StandardAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer maxTokenLength; @@ -163,6 +163,11 @@ public final Builder stopwords(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StandardAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StopAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StopAnalyzer.java index 295a5fd3c..93c57e5aa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StopAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/StopAnalyzer.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StopAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String version; @@ -189,6 +189,11 @@ public final Builder stopwordsPath(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StopAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterBase.java index c25fa2fb6..c42453759 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -86,7 +86,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String version; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinition.java index e22f736d2..26534b2cb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenFilterDefinition.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -1043,10 +1043,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Kind _kind; private TokenFilterDefinitionVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder asciifolding(AsciiFoldingTokenFilter v) { this._kind = Kind.Asciifolding; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerBase.java index 6b588f897..66c491984 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -86,7 +86,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String version; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java index 1870e64b8..431eb4612 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TokenizerDefinition.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -385,10 +385,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Kind _kind; private TokenizerDefinitionVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder charGroup(CharGroupTokenizer v) { this._kind = Kind.CharGroup; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/WhitespaceAnalyzer.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/WhitespaceAnalyzer.java index 2e4d0bfca..8c61c00e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/WhitespaceAnalyzer.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/WhitespaceAnalyzer.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link WhitespaceAnalyzer}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String version; @@ -117,6 +119,11 @@ public final Builder version(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link WhitespaceAnalyzer}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/AllField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/AllField.java index 5911f38bb..8d2dcf34a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/AllField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/AllField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -211,7 +211,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String analyzer; private Boolean enabled; @@ -312,6 +312,11 @@ public final Builder storeTermVectors(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CorePropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CorePropertyBase.java index a65889d6f..a7fa8e358 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CorePropertyBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/CorePropertyBase.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java index b2fb24616..0f8de7a37 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -118,7 +118,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DenseVectorIndexOptions}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String type; private Integer m; @@ -149,6 +151,11 @@ public final Builder efConstruction(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DenseVectorIndexOptions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DocValuesPropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DocValuesPropertyBase.java index 991e1b424..2d3de61ad 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DocValuesPropertyBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DocValuesPropertyBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicTemplate.java index 5a891c396..8ff2db054 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DynamicTemplate.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -196,7 +196,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DynamicTemplate}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Property mapping; @@ -281,6 +281,11 @@ public final Builder unmatch(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DynamicTemplate}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldMapping.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldMapping.java index 1f276b30e..183dc4609 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldMapping.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldMapping.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -128,7 +128,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldMapping}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; /** @@ -180,6 +180,11 @@ public final Builder mapping(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean enabled; /** @@ -101,6 +101,11 @@ public final Builder enabled(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldNamesField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/IndexField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/IndexField.java index ee3b15d5f..d114521ad 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/IndexField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/IndexField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -89,7 +89,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean enabled; /** @@ -100,6 +100,11 @@ public final Builder enabled(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/NumberPropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/NumberPropertyBase.java index e50042b99..97f6d7ab6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/NumberPropertyBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/NumberPropertyBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java index 16880e2a4..a30a90af4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/Property.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -952,10 +952,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private PropertyVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder aggregateMetricDouble(AggregateMetricDoubleProperty v) { this._kind = Kind.AggregateMetricDouble; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java index 0aa77b583..6fc5c3ec9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/PropertyBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -207,7 +207,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Map localMetadata; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RangePropertyBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RangePropertyBase.java index c67d5ac26..0d642f306 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RangePropertyBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RangePropertyBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RoutingField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RoutingField.java index b21766336..f901e9c5a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RoutingField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RoutingField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -89,7 +89,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RoutingField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean required; /** @@ -100,6 +100,11 @@ public final Builder required(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RoutingField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java index 476bb63f0..d6396b128 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -125,7 +125,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RuntimeField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String format; @@ -165,6 +165,11 @@ public final Builder type(RuntimeFieldType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RuntimeField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SizeField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SizeField.java index cbb2d1733..5ccd3241d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SizeField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SizeField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -89,7 +89,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SizeField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean enabled; /** @@ -100,6 +100,11 @@ public final Builder enabled(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SizeField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SourceField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SourceField.java index f55056249..f7c1a74bd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SourceField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SourceField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -171,7 +171,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SourceField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean compress; @@ -251,6 +251,11 @@ public final Builder includes(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SourceField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/StandardNumberProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/StandardNumberProperty.java index a667e5e74..b5f5a01e9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/StandardNumberProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/StandardNumberProperty.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SuggestContext.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SuggestContext.java index f5c8e223b..46ced373d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SuggestContext.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SuggestContext.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -139,7 +139,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SuggestContext}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; @Nullable @@ -182,6 +182,11 @@ public final Builder precision(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SuggestContext}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java index 7aca0b0a8..23ecb1e94 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TextIndexPrefixes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer maxChars; private Integer minChars; @@ -124,6 +124,11 @@ public final Builder minChars(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TextIndexPrefixes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TypeMapping.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TypeMapping.java index e3f9b8bd8..67fff638e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TypeMapping.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TypeMapping.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -362,7 +362,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TypeMapping}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private AllField allField; @@ -649,6 +649,11 @@ public final Builder enabled(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TypeMapping}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayFunctionBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayFunctionBase.java index 8e360694c..9a267ba92 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayFunctionBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayFunctionBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import javax.annotation.Nullable; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayPlacement.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayPlacement.java index 12728fc31..d276294ef 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayPlacement.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DecayPlacement.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -147,7 +147,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DecayPlacement}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Double decay; @@ -192,6 +192,11 @@ public final Builder origin(@Nullable JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DecayPlacement}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldAndFormat.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldAndFormat.java index c4fb7fa8d..6f5b82a7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldAndFormat.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldAndFormat.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldAndFormat}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; @Nullable @@ -172,6 +172,11 @@ public final Builder includeUnmapped(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldAndFormat}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java index a16ed5ced..9d8575f95 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FieldLookup.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -142,7 +142,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldLookup}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; @Nullable @@ -186,6 +186,11 @@ public final Builder routing(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldLookup}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FunctionScore.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FunctionScore.java index 40191d05d..f6169e71d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FunctionScore.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/FunctionScore.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Object; @@ -279,7 +279,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase { + public static class Builder extends WithJsonObjectBuilderBase { private Kind _kind; private Object _value; @@ -312,6 +312,10 @@ public final Builder weight(@Nullable Double value) { return this; } + @Override + protected Builder self() { + return this; + } public ContainerBuilder exp(DecayFunction v) { this._kind = Kind.Exp; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/GeoPolygonPoints.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/GeoPolygonPoints.java index 32c3dab30..26030aee0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/GeoPolygonPoints.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/GeoPolygonPoints.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GeoPolygonPoints}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List points; /** @@ -132,6 +132,11 @@ public final Builder points(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private JsonData shape; @@ -170,6 +172,11 @@ public final Builder relation(@Nullable GeoShapeRelation value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GeoShapeFieldQuery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Intervals.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Intervals.java index f62f2b922..71253b944 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Intervals.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Intervals.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.util.Objects; @@ -246,10 +246,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder allOf(IntervalsAllOf v) { this._kind = Kind.AllOf; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsAllOf.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsAllOf.java index 29439d1fe..214a135d1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsAllOf.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsAllOf.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -168,7 +168,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IntervalsAllOf}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List intervals; @Nullable @@ -240,6 +240,11 @@ public final Builder filter(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List intervals; @Nullable @@ -182,6 +182,11 @@ public final Builder filter(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder after(Intervals v) { this._kind = Kind.After; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsFuzzy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsFuzzy.java index 9e1fa1a4a..c9ecae269 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsFuzzy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsFuzzy.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -195,7 +195,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IntervalsFuzzy}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String analyzer; @@ -261,6 +261,11 @@ public final Builder useField(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IntervalsFuzzy}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsMatch.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsMatch.java index 806301a6e..ece7ba6c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsMatch.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsMatch.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -195,7 +195,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IntervalsMatch}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String analyzer; @@ -268,6 +268,11 @@ public final Builder filter(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String analyzer; @@ -175,6 +175,11 @@ public final Builder useField(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IntervalsPrefix}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsWildcard.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsWildcard.java index 4e9692afc..4de70414a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsWildcard.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/IntervalsWildcard.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -142,7 +142,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IntervalsWildcard}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String analyzer; @@ -175,6 +175,11 @@ public final Builder useField(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IntervalsWildcard}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LikeDocument.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LikeDocument.java index 84aa10c6f..91384e2ba 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LikeDocument.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LikeDocument.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -243,7 +243,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LikeDocument}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private JsonData doc; @@ -367,6 +367,11 @@ public final Builder versionType(@Nullable VersionType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LikeDocument}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/PinnedDoc.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/PinnedDoc.java index 65d249d2f..d7232a140 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/PinnedDoc.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/PinnedDoc.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PinnedDoc}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private String index; @@ -124,6 +124,11 @@ public final Builder index(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PinnedDoc}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java index 445716144..dd218132b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java @@ -34,9 +34,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.util.Objects; @@ -1168,10 +1168,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder bool(BoolQuery v) { this._kind = Kind.Bool; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/QueryBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/QueryBase.java index b7d84b90b..4c5ed2c91 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/QueryBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/QueryBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.lang.String; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Float boost; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java index 088cc7b87..ebcd6424b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import javax.annotation.Nullable; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunction.java index 7a91828f1..5c312d85c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunction.java @@ -28,7 +28,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; @@ -47,7 +47,7 @@ public RankFeatureFunction() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { protected abstract BuilderT self(); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionLogarithm.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionLogarithm.java index 44f1aa6bc..a493ed73f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionLogarithm.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionLogarithm.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.util.Objects; @@ -90,7 +90,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankFeatureFunctionLogarithm}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Float scalingFactor; /** @@ -101,6 +103,11 @@ public final Builder scalingFactor(float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankFeatureFunctionLogarithm}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSaturation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSaturation.java index 7bf9f202f..5604973d7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSaturation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSaturation.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.util.Objects; @@ -95,7 +95,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankFeatureFunctionSaturation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Float pivot; @@ -107,6 +109,11 @@ public final Builder pivot(@Nullable Float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankFeatureFunctionSaturation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSigmoid.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSigmoid.java index e4b56fe9f..4801dc404 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSigmoid.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RankFeatureFunctionSigmoid.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.util.Objects; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankFeatureFunctionSigmoid}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Float pivot; private Float exponent; @@ -124,6 +126,11 @@ public final Builder exponent(float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankFeatureFunctionSigmoid}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ScoreFunctionBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ScoreFunctionBase.java index 89e8cf11d..ddd2885b4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ScoreFunctionBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ScoreFunctionBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Query filter; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ShapeFieldQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ShapeFieldQuery.java index 28422f52d..1ec91607b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ShapeFieldQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/ShapeFieldQuery.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -129,7 +129,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShapeFieldQuery}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private FieldLookup indexedShape; @@ -170,6 +170,11 @@ public final Builder shape(@Nullable JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShapeFieldQuery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SpanQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SpanQuery.java index 94cd15b06..8e14fd876 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SpanQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/SpanQuery.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.util.Objects; @@ -314,10 +314,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder spanContaining(SpanContainingQuery v) { this._kind = Kind.SpanContaining; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermsLookup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermsLookup.java index 981d32dd4..af50b9db3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermsLookup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermsLookup.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermsLookup}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String index; private String id; @@ -176,6 +176,11 @@ public final Builder routing(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermsLookup}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearch.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearch.java index 2af294965..7d734c26c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearch.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearch.java @@ -36,11 +36,12 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -60,7 +61,7 @@ * @see API * specification */ - +@JsonpDeserializable public class AsyncSearch implements JsonpSerializable { private final Map aggregations; @@ -319,7 +320,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AsyncSearch}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { @Nullable private Map aggregations; @@ -558,6 +561,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link AsyncSearch}. * @@ -582,6 +590,14 @@ public static JsonpDeserializer> createAsyncS op -> AsyncSearch.setupAsyncSearchDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link AsyncSearch} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createAsyncSearchDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search._types.TDocument"))); + protected static void setupAsyncSearchDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchDocumentResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchDocumentResponseBase.java index ff0d8589a..170062c1d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchDocumentResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchDocumentResponseBase.java @@ -31,6 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java index 901b01f83..58cde2352 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -140,7 +140,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String id; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusResponse.java index 74000e531..7da8002cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusResponse.java @@ -178,8 +178,9 @@ public static JsonpDeserializer * Json deserializer for {@link AsyncSearchStatusResponse} based on named * deserializers provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createAsyncSearchStatusResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.status.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createAsyncSearchStatusResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.status.TDocument"))); protected static void setupAsyncSearchStatusResponseDeserializer( ObjectDeserializer> op, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchResponse.java index 76f947fbc..e5a5ef557 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchResponse.java @@ -99,8 +99,9 @@ public static JsonpDeserializer> c * Json deserializer for {@link GetAsyncSearchResponse} based on named * deserializers provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createGetAsyncSearchResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.get.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createGetAsyncSearchResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.get.TDocument"))); protected static void setupGetAsyncSearchResponseDeserializer( ObjectDeserializer> op, 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 273149865..c5d7ec817 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 @@ -53,7 +53,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -1085,7 +1085,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SubmitRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SourceConfig source; @@ -2178,6 +2178,11 @@ public final Builder waitForCompletionTimeout(Function JsonpDeserializer> createSub * Json deserializer for {@link SubmitResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createSubmitResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.submit.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createSubmitResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:async_search.submit.TDocument"))); protected static void setupSubmitResponseDeserializer( ObjectDeserializer> op, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java index 8b9b84273..c6fd738e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -148,7 +148,7 @@ public AutoscalingPolicy build() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private List roles; private Map deciders; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityResponse.java index 6a3fef85a..3bf4384d1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetAutoscalingCapacityResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map policies; /** @@ -136,6 +138,11 @@ public final Builder policies(String key, return policies(key, fn.apply(new AutoscalingDeciders.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetAutoscalingCapacityResponse}. * 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 592ca5ab8..479f3e5f6 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 @@ -35,8 +35,9 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.String; import java.util.Collections; import java.util.Objects; @@ -104,7 +105,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutAutoscalingPolicyRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private AutoscalingPolicy policy; @@ -138,6 +141,19 @@ public final Builder policy(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private AutoscalingResources node; private AutoscalingResources total; @@ -138,6 +140,11 @@ public final Builder total(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private AutoscalingCapacity requiredCapacity; @Nullable @@ -168,6 +170,11 @@ public final Builder reasonDetails(@Nullable JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoscalingDecider}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingDeciders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingDeciders.java index 42335a04b..362005f24 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingDeciders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingDeciders.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -148,7 +148,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoscalingDeciders}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private AutoscalingCapacity requiredCapacity; private AutoscalingCapacity currentCapacity; @@ -248,6 +250,11 @@ public final Builder deciders(String key, return deciders(key, fn.apply(new AutoscalingDecider.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoscalingDeciders}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingNode.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingNode.java index 76a5be3f5..66dcc5402 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingNode.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingNode.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoscalingNode}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; /** @@ -102,6 +102,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoscalingNode}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingResources.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingResources.java index c2e74d2ec..48389b823 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingResources.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/get_autoscaling_capacity/AutoscalingResources.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoscalingResources}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer storage; private Integer memory; @@ -124,6 +126,11 @@ public final Builder memory(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoscalingResources}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesResponse.java index 11abbbca8..640e7960e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AliasesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(AliasesRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AliasesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationResponse.java index 6f1cd5344..d272ec020 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllocationResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(AllocationRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRequestBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRequestBase.java index a83d1d9d2..12663d865 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRequestBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRequestBase.java @@ -29,7 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; @@ -47,7 +47,7 @@ public CatRequestBase() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { protected abstract BuilderT self(); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountResponse.java index 80996bb5f..c7edb1cb0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CountResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer.arrayDeserializer(CountRecord._DESERIALIZER) + .deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CountResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataResponse.java index 00c32436e..1b676c05f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FielddataResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(FielddataRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FielddataResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthResponse.java index a53370056..a623affaa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HealthResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(HealthRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HealthResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpResponse.java index f73bc31fe..09854d90d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HelpResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HelpResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer.arrayDeserializer(HelpRecord._DESERIALIZER) + .deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HelpResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesResponse.java index 207068cc6..cfc78e1ac 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(IndicesRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterResponse.java index 07c224d7b..2bfa9708f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MasterResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(MasterRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MasterResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsResponse.java index e9152d42e..d25d2dec7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -91,7 +92,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MlDataFrameAnalyticsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -130,6 +133,20 @@ public final Builder valueBody( return valueBody(fn.apply(new DataFrameAnalyticsRecord.Builder()).build()); } + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + List value = (List) JsonpDeserializer + .arrayDeserializer(DataFrameAnalyticsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MlDataFrameAnalyticsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsResponse.java index 75cac1e84..e0e255abb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MlDatafeedsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(DatafeedsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MlDatafeedsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsResponse.java index 2c40610e2..7d1122d3e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MlJobsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer.arrayDeserializer(JobsRecord._DESERIALIZER) + .deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MlJobsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsResponse.java index 7b5c9d1d5..e0e3e6bc0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MlTrainedModelsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(TrainedModelsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MlTrainedModelsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsResponse.java index 065567941..cce36ab10 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeattrsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(NodeAttributesRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeattrsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesResponse.java index 89c24e43b..cc6a1cc68 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer.arrayDeserializer(NodesRecord._DESERIALIZER) + .deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksResponse.java index 6e85b9931..f210a2383 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PendingTasksResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(PendingTasksRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PendingTasksResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsResponse.java index 9fa384fb4..f18a58590 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PluginsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(PluginsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PluginsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryResponse.java index c54dc8e7b..d54b99629 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(RecoveryRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesResponse.java index 772e3e22a..4698d9248 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RepositoriesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(RepositoriesRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RepositoriesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsResponse.java index 70de09abc..1db5b1347 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SegmentsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(SegmentsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SegmentsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsResponse.java index 5a9f3ac01..01b8e147f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(ShardsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsResponse.java index 082c377a8..7c38f3ce7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SnapshotsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(SnapshotsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SnapshotsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksResponse.java index 1989ab05d..c0624d829 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TasksResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer.arrayDeserializer(TasksRecord._DESERIALIZER) + .deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TasksResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesResponse.java index cbbdcfb4a..b58d93860 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TemplatesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List valueBody; /** @@ -128,6 +129,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(TemplatesRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TemplatesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolResponse.java index 1ddd930b7..f689777fb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ThreadPoolResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(ThreadPoolRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ThreadPoolResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsResponse.java index e93a5ef6c..d2c2b301e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -90,7 +91,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TransformsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List valueBody; /** @@ -128,6 +131,20 @@ public final Builder valueBody(Function value = (List) JsonpDeserializer + .arrayDeserializer(TransformsRecord._DESERIALIZER).deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TransformsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/aliases/AliasesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/aliases/AliasesRecord.java index 67e6921d7..7606d8d6c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/aliases/AliasesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/aliases/AliasesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -191,7 +191,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AliasesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String alias; @@ -270,6 +270,11 @@ public final Builder isWriteIndex(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AliasesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/allocation/AllocationRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/allocation/AllocationRecord.java index 18783ae1f..b1eda18c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/allocation/AllocationRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/allocation/AllocationRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -249,7 +249,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllocationRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String shards; @@ -367,6 +367,11 @@ public final Builder node(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/count/CountRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/count/CountRecord.java index 746051146..7b531291a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/count/CountRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/count/CountRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CountRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String epoch; @@ -174,6 +174,11 @@ public final Builder count(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CountRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/fielddata/FielddataRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/fielddata/FielddataRecord.java index 5f5e15498..9619889ce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/fielddata/FielddataRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/fielddata/FielddataRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -192,7 +192,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FielddataRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -271,6 +271,11 @@ public final Builder size(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FielddataRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/health/HealthRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/health/HealthRecord.java index 50974e861..b8be6a499 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/health/HealthRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/health/HealthRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -343,7 +343,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HealthRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String epoch; @@ -526,6 +526,11 @@ public final Builder activeShardsPercent(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HealthRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/help/HelpRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/help/HelpRecord.java index d0fb44f73..4bc6d675a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/help/HelpRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/help/HelpRecord.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -90,7 +90,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HelpRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String endpoint; /** @@ -101,6 +101,11 @@ public final Builder endpoint(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HelpRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java index 5ea5b82cd..5061d7823 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/indices/IndicesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -2758,7 +2758,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String health; @@ -4594,6 +4594,11 @@ public final Builder priBulkAvgSizeInBytes(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/master/MasterRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/master/MasterRecord.java index 20218d933..5e939d934 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/master/MasterRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/master/MasterRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -153,7 +153,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MasterRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -206,6 +206,11 @@ public final Builder node(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MasterRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_data_frame_analytics/DataFrameAnalyticsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_data_frame_analytics/DataFrameAnalyticsRecord.java index 41b0eca06..45240a5ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_data_frame_analytics/DataFrameAnalyticsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_data_frame_analytics/DataFrameAnalyticsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -382,7 +382,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DataFrameAnalyticsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String id; @@ -591,6 +593,11 @@ public final Builder nodeAddress(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DataFrameAnalyticsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_datafeeds/DatafeedsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_datafeeds/DatafeedsRecord.java index 6b9ff1991..16632e662 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_datafeeds/DatafeedsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_datafeeds/DatafeedsRecord.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -306,7 +306,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DatafeedsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -463,6 +463,11 @@ public final Builder nodeAddress(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DatafeedsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_jobs/JobsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_jobs/JobsRecord.java index 198fcd984..a8a03cdbf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_jobs/JobsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_jobs/JobsRecord.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -1217,7 +1217,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link JobsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -1998,6 +1998,11 @@ public final Builder bucketsTimeExpAvgHour(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link JobsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_trained_models/TrainedModelsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_trained_models/TrainedModelsRecord.java index 1e776b5a5..e04355648 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_trained_models/TrainedModelsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ml_trained_models/TrainedModelsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -402,7 +402,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TrainedModelsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String id; @@ -625,6 +627,11 @@ public final Builder dataFrameAnalysis(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TrainedModelsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodeattrs/NodeAttributesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodeattrs/NodeAttributesRecord.java index c2f0cce62..5fe8b3753 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodeattrs/NodeAttributesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodeattrs/NodeAttributesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -230,7 +230,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeAttributesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String node; @@ -335,6 +337,11 @@ public final Builder value(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeAttributesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodes/NodesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodes/NodesRecord.java index 3a933dfe3..44206c6bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodes/NodesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/nodes/NodesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -1902,7 +1902,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -3152,6 +3152,11 @@ public final Builder bulkAvgSizeInBytes(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/pending_tasks/PendingTasksRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/pending_tasks/PendingTasksRecord.java index 3bf9b30b0..8a6d00690 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/pending_tasks/PendingTasksRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/pending_tasks/PendingTasksRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -154,7 +154,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PendingTasksRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String insertorder; @@ -207,6 +209,11 @@ public final Builder source(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PendingTasksRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/plugins/PluginsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/plugins/PluginsRecord.java index cbce23c4f..3fd0b0966 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/plugins/PluginsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/plugins/PluginsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -191,7 +191,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PluginsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -270,6 +270,11 @@ public final Builder type(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PluginsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/recovery/RecoveryRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/recovery/RecoveryRecord.java index f93d0d5b7..9d96307e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/recovery/RecoveryRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/recovery/RecoveryRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -571,7 +571,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String index; @@ -910,6 +910,11 @@ public final Builder translogOpsPercent(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/repositories/RepositoriesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/repositories/RepositoriesRecord.java index 789b9b07f..fe10b0f81 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/repositories/RepositoriesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/repositories/RepositoriesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -116,7 +116,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RepositoriesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String id; @@ -143,6 +145,11 @@ public final Builder type(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RepositoriesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/segments/SegmentsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/segments/SegmentsRecord.java index 39fd3bac9..11edab4ed 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/segments/SegmentsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/segments/SegmentsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -362,7 +362,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SegmentsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String index; @@ -558,6 +558,11 @@ public final Builder compound(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SegmentsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/shards/ShardsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/shards/ShardsRecord.java index f7b8a0433..b3690d375 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/shards/ShardsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/shards/ShardsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -1522,7 +1522,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String index; @@ -2512,6 +2512,11 @@ public final Builder bulkAvgSizeInBytes(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/snapshots/SnapshotsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/snapshots/SnapshotsRecord.java index 09caee771..50cc1c585 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/snapshots/SnapshotsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/snapshots/SnapshotsRecord.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -326,7 +326,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SnapshotsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -505,6 +505,11 @@ public final Builder reason(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SnapshotsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/tasks/TasksRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/tasks/TasksRecord.java index ba7dad6b1..0e7bb8fe3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/tasks/TasksRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/tasks/TasksRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -381,7 +381,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TasksRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -590,6 +590,11 @@ public final Builder description(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TasksRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/templates/TemplatesRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/templates/TemplatesRecord.java index 155c92184..a739c85b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/templates/TemplatesRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/templates/TemplatesRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -173,7 +173,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TemplatesRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String name; @@ -239,6 +239,11 @@ public final Builder composedOf(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TemplatesRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/thread_pool/ThreadPoolRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/thread_pool/ThreadPoolRecord.java index 3eb49f453..91d7317ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/thread_pool/ThreadPoolRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/thread_pool/ThreadPoolRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -458,7 +458,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ThreadPoolRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String nodeName; @@ -719,6 +719,11 @@ public final Builder keepAlive(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ThreadPoolRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java index 00e209cfc..010f7b4fe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -705,7 +705,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TransformsRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String id; @@ -1135,6 +1135,11 @@ public final Builder processedDocumentsExpAvg(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TransformsRecord}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsResponse.java index 35b3ab55a..5b46184d3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/CcrStatsResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CcrStatsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private AutoFollowStats autoFollowStats; private FollowStats followStats; @@ -139,6 +139,11 @@ public final Builder followStats(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String index; private List shards; @@ -154,6 +154,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List followerIndices; /** @@ -131,6 +133,11 @@ public final Builder followerIndices(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String index; @Nullable @@ -510,6 +510,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FollowRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowResponse.java index 9c5a64142..d516aca7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -117,7 +117,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FollowResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean followIndexCreated; private Boolean followIndexShardsAcked; @@ -148,6 +148,11 @@ public final Builder indexFollowingStarted(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FollowResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsResponse.java index e894d76e0..0f906f794 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowStatsResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -98,7 +98,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FollowStatsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List indices; /** @@ -130,6 +132,11 @@ public final Builder indices(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String followerCluster; @@ -223,6 +225,11 @@ public final Builder leaderRemoteCluster(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ForgetFollowerRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerResponse.java index f7575e366..497f85f1a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ForgetFollowerResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -90,7 +90,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ForgetFollowerResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ShardStatistics shards; /** @@ -108,6 +110,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List patterns; /** @@ -132,6 +134,11 @@ public final Builder patterns(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String followIndexPattern; @@ -713,6 +715,11 @@ public final Builder settings(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutAutoFollowPatternRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ReadException.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ReadException.java index 32af01282..2b566ddb7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ReadException.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ReadException.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReadException}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ErrorCause exception; private Long fromSeqNo; @@ -156,6 +156,11 @@ public final Builder retries(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReadException}. * 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 7777dcc4b..9f3331381 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 @@ -36,7 +36,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -268,7 +268,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ResumeFollowRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; @Nullable @@ -405,6 +407,11 @@ public final Builder readPollTimeout(Function> return this.readPollTimeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResumeFollowRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ShardStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ShardStats.java index ad7ca23c3..0179c4ff2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ShardStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ShardStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -485,7 +485,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long bytesRead; private Long failedReadRequests; @@ -805,6 +805,11 @@ public final Builder writeBufferSizeInBytes(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndex.java index 7ebe4c04a..8973b7422 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndex.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -147,7 +147,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FollowerIndex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String followerIndex; private String leaderIndex; @@ -207,6 +207,11 @@ public final Builder status(FollowerIndexStatus value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FollowerIndex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndexParameters.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndexParameters.java index db5518d29..55874eb4a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndexParameters.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/follow_info/FollowerIndexParameters.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -216,7 +216,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FollowerIndexParameters}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer maxOutstandingReadRequests; private Integer maxOutstandingWriteRequests; @@ -331,6 +333,11 @@ public final Builder readPollTimeout(Function> return this.readPollTimeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FollowerIndexParameters}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPattern.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPattern.java index 01ed7b826..3add0fd15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPattern.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPattern.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoFollowPattern}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private AutoFollowPatternSummary pattern; @@ -133,6 +133,11 @@ public final Builder pattern( return this.pattern(fn.apply(new AutoFollowPatternSummary.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoFollowPattern}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPatternSummary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPatternSummary.java index a09db2906..591f43fd7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPatternSummary.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/get_auto_follow_pattern/AutoFollowPatternSummary.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -193,7 +193,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoFollowPatternSummary}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean active; private String remoteCluster; @@ -299,6 +301,11 @@ public final Builder maxOutstandingReadRequests(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoFollowPatternSummary}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/AutoFollowStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/AutoFollowStats.java index 5f7744ba7..88f558b33 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/AutoFollowStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/AutoFollowStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.List; @@ -164,7 +164,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AutoFollowStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List autoFollowedClusters; private Long numberOfFailedFollowIndices; @@ -259,6 +259,11 @@ public final Builder recentAutoFollowErrors(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String clusterName; private Long lastSeenMetadataVersion; @@ -151,6 +153,11 @@ public final Builder timeSinceLastCheckMillis(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AutoFollowedCluster}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/FollowStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/FollowStats.java index 464fc8e2e..def2f0fa5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/FollowStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/stats/FollowStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FollowStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List indices; /** @@ -131,6 +131,11 @@ public final Builder indices(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String currentNode; @@ -272,6 +274,11 @@ public final Builder shard(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationExplainRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainResponse.java index 1ab7d7f38..ac6699f0a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainResponse.java @@ -37,7 +37,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -502,7 +502,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllocationExplainResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String allocateExplanation; @@ -866,6 +868,11 @@ public final Builder note(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationExplainResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplate.java index 5acfc32ef..0ba2faf25 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplate.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ComponentTemplate}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private ComponentTemplateNode componentTemplate; @@ -133,6 +133,11 @@ public final Builder componentTemplate( return this.componentTemplate(fn.apply(new ComponentTemplateNode.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ComponentTemplate}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateNode.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateNode.java index c56891468..c4eaed44f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateNode.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateNode.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -133,7 +133,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ComponentTemplateNode}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ComponentTemplateSummary template; @Nullable @@ -186,6 +188,11 @@ public final Builder meta(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ComponentTemplateNode}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java index 7df6586cc..28f087791 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplateSummary.java @@ -35,7 +35,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -182,7 +182,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ComponentTemplateSummary}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map meta; @@ -298,6 +300,11 @@ public final Builder aliases(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map persistent; private Map transient_; @@ -211,6 +213,11 @@ public final Builder defaults(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetClusterSettingsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateResponse.java index ec6b194c8..370e2d5cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetComponentTemplateResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List componentTemplates; /** @@ -133,6 +135,11 @@ public final Builder componentTemplates( return componentTemplates(fn.apply(new ComponentTemplate.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetComponentTemplateResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthResponse.java index e01165f2c..2fdfdfa7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/HealthResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -334,7 +334,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HealthResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer activePrimaryShards; private Integer activeShards; @@ -549,6 +549,11 @@ public final Builder unassignedShards(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HealthResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksResponse.java index c6f78fc83..6f8ece1c9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PendingTasksResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PendingTasksResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List tasks; /** @@ -131,6 +133,11 @@ public final Builder tasks(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean flatSettings; @@ -276,6 +278,11 @@ public final Builder transient_(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutClusterSettingsRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsResponse.java index 2697a51d9..657de8167 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/PutClusterSettingsResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -136,7 +136,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutClusterSettingsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean acknowledged; private Map persistent; @@ -191,6 +193,11 @@ public final Builder transient_(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutClusterSettingsResponse}. * 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 5b054d34e..2d9b5bc2f 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 @@ -41,7 +41,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -241,7 +241,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutComponentTemplateRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map meta; @@ -409,6 +411,11 @@ public final Builder version(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutComponentTemplateRequest}. * 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 bec09c999..8d1dea76d 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -199,7 +199,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RerouteRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List commands; @@ -355,6 +355,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RerouteRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteResponse.java index 3c48cd3d5..90ec3c792 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/RerouteResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -116,7 +116,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RerouteResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List explanations; @@ -163,6 +163,11 @@ public final Builder state(JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RerouteResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateResponse.java index 44dafc13e..9e4087f6c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -84,7 +85,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StateResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private JsonData valueBody; /** @@ -97,6 +98,19 @@ public final Builder valueBody(JsonData value) { return this; } + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + JsonData value = (JsonData) JsonData._DESERIALIZER.deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StateResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationDecision.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationDecision.java index 6a22be16a..490e2631d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationDecision.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationDecision.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -116,7 +116,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllocationDecision}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String decider; private AllocationExplainDecision decision; @@ -147,6 +149,11 @@ public final Builder explanation(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationDecision}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationStore.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationStore.java index 4b50f00d8..104a287b9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationStore.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/AllocationStore.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -159,7 +159,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AllocationStore}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String allocationId; private Boolean found; @@ -220,6 +220,11 @@ public final Builder storeException(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AllocationStore}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/ClusterInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/ClusterInfo.java index 6d075b9bf..70c5d1969 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/ClusterInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/ClusterInfo.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -186,7 +186,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterInfo}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map nodes; private Map shardSizes; @@ -316,6 +316,11 @@ public final Builder reservedSizes(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private String name; @@ -216,6 +216,11 @@ public final Builder weightRanking(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CurrentNode}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/DiskUsage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/DiskUsage.java index 17541d65d..1994e8a14 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/DiskUsage.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/DiskUsage.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; @@ -158,7 +158,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DiskUsage}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String path; private Long totalBytes; @@ -219,6 +219,11 @@ public final Builder usedDiskPercent(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DiskUsage}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java index 2bf67f642..64a7c7319 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeAllocationExplanation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -203,7 +203,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeAllocationExplanation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List deciders; private Map nodeAttributes; @@ -325,6 +327,11 @@ public final Builder weightRanking(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodeAllocationExplanation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeDiskUsage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeDiskUsage.java index d7b5aa02f..3fb6b4669 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeDiskUsage.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/NodeDiskUsage.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -117,7 +117,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodeDiskUsage}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String nodeName; private DiskUsage leastAvailable; @@ -162,6 +162,11 @@ public final Builder mostAvailable(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String nodeId; private String path; @@ -193,6 +193,11 @@ public final Builder shards(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReservedSize}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/UnassignedInformation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/UnassignedInformation.java index de996ed0f..f48de2892 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/UnassignedInformation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/allocation_explain/UnassignedInformation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -191,7 +191,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UnassignedInformation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String at; @Nullable @@ -267,6 +269,11 @@ public final Builder allocationStatus(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UnassignedInformation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/IndexHealthStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/IndexHealthStats.java index e4abd96bb..33b1f4a34 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/IndexHealthStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/IndexHealthStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -206,7 +206,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexHealthStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer activePrimaryShards; private Integer activeShards; @@ -320,6 +320,11 @@ public final Builder unassignedShards(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexHealthStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/ShardHealthStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/ShardHealthStats.java index 16e62254e..0b6cbe463 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/ShardHealthStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/ShardHealthStats.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -157,7 +157,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardHealthStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer activeShards; private Integer initializingShards; @@ -218,6 +218,11 @@ public final Builder unassignedShards(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardHealthStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/pending_tasks/PendingTask.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/pending_tasks/PendingTask.java index f079b83af..b27749a26 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/pending_tasks/PendingTask.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/pending_tasks/PendingTask.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -158,7 +158,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PendingTask}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean executing; private Integer insertOrder; @@ -219,6 +219,11 @@ public final Builder timeInQueueMillis(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PendingTask}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteInfo.java index e12eb0c01..54496c208 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteInfo.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -156,10 +156,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private ClusterRemoteInfoVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder proxy(ClusterRemoteProxyInfo v) { this._kind = Kind.Proxy; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteProxyInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteProxyInfo.java index a40e4c469..f94219b35 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteProxyInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteProxyInfo.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -185,7 +185,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterRemoteProxyInfo}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean connected; private Time initialConnectTimeout; @@ -263,6 +265,11 @@ public final Builder maxProxySocketConnections(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterRemoteProxyInfo}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteSniffInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteSniffInfo.java index b5471ddfb..28f3c3274 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteSniffInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/remote_info/ClusterRemoteSniffInfo.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -181,7 +181,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterRemoteSniffInfo}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean connected; private Integer maxConnectionsPerCluster; @@ -261,6 +263,11 @@ public final Builder seeds(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterRemoteSniffInfo}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/Command.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/Command.java index 3e8999a05..0abaad7ec 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/Command.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/Command.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -198,7 +198,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Command}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private CommandCancelAction cancel; @@ -360,6 +360,11 @@ public final Builder allocateEmptyPrimary( return this.allocateEmptyPrimary(fn.apply(new CommandAllocatePrimaryAction.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Command}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocatePrimaryAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocatePrimaryAction.java index 48ddfa0c0..b1c6ee347 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocatePrimaryAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocatePrimaryAction.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -137,7 +137,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CommandAllocatePrimaryAction}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; private Integer shard; @@ -183,6 +185,11 @@ public final Builder acceptDataLoss(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CommandAllocatePrimaryAction}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java index a0cfb79a7..5be9e4445 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandAllocateReplicaAction.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -121,7 +121,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CommandAllocateReplicaAction}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; private Integer shard; @@ -152,6 +154,11 @@ public final Builder node(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CommandAllocateReplicaAction}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandCancelAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandCancelAction.java index 6e30e7e1d..f9f1f4e4c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandCancelAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandCancelAction.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -137,7 +137,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CommandCancelAction}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; private Integer shard; @@ -179,6 +181,11 @@ public final Builder allowPrimary(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CommandCancelAction}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandMoveAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandMoveAction.java index eb1f7f7b3..f85065f2e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandMoveAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/CommandMoveAction.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -135,7 +135,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CommandMoveAction}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String index; private Integer shard; @@ -180,6 +180,11 @@ public final Builder toNode(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CommandMoveAction}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteDecision.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteDecision.java index 4903004ed..57a991903 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteDecision.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteDecision.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -117,7 +117,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RerouteDecision}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String decider; private String decision; @@ -148,6 +148,11 @@ public final Builder explanation(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RerouteDecision}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteExplanation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteExplanation.java index 1d9f04925..e3a0e93fc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteExplanation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/reroute/RerouteExplanation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -125,7 +125,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RerouteExplanation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String command; private List decisions; @@ -184,6 +186,11 @@ public final Builder parameters(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean allowPrimary; private String index; @@ -230,6 +230,11 @@ public final Builder toNode(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RerouteParameters}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java index aefd485bd..1fc8013c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/CharFilterTypes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -241,7 +241,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CharFilterTypes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List charFilterTypes; private List tokenizerTypes; @@ -490,6 +490,11 @@ public final Builder builtInAnalyzers(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long availableInBytes; private Long freeInBytes; @@ -147,6 +147,11 @@ public final Builder totalInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterFileSystem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndices.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndices.java index e63327a63..76292747e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndices.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndices.java @@ -37,7 +37,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.List; @@ -259,7 +259,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterIndices}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private CompletionStats completion; private Long count; @@ -501,6 +501,11 @@ public final Builder versions(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private ClusterIndicesShardsIndex index; @@ -218,6 +220,11 @@ public final Builder total(@Nullable Double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterIndicesShards}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndicesShardsIndex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndicesShardsIndex.java index 6b10d0651..78446443f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndicesShardsIndex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterIndicesShardsIndex.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -125,7 +125,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterIndicesShardsIndex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ClusterShardMetrics primaries; private ClusterShardMetrics replication; @@ -195,6 +197,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer numberOfPipelines; private Map processorStats; @@ -157,6 +157,11 @@ public final Builder processorStats(String key, return processorStats(key, fn.apply(new ClusterProcessor.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterIngest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvm.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvm.java index 93fee512c..11d797ca5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvm.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvm.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.List; @@ -138,7 +138,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterJvm}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long maxUptimeInMillis; private ClusterJvmMemory mem; @@ -207,6 +207,11 @@ public final Builder versions(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long heapMaxInBytes; private Long heapUsedInBytes; @@ -124,6 +124,11 @@ public final Builder heapUsedInBytes(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterJvmMemory}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvmVersion.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvmVersion.java index fa8d5929e..6dcbcf4ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvmVersion.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterJvmVersion.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -171,7 +171,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterJvmVersion}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean bundledJdk; private Integer count; @@ -242,6 +242,11 @@ public final Builder vmVersion(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterJvmVersion}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNetworkTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNetworkTypes.java index d0c8043f7..d459866c6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNetworkTypes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNetworkTypes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -123,7 +123,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterNetworkTypes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map httpTypes; private Map transportTypes; @@ -168,6 +170,11 @@ public final Builder transportTypes(String key, Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterNetworkTypes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodeCount.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodeCount.java index ba1ed8a20..e633de078 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodeCount.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodeCount.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -265,7 +265,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterNodeCount}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer coordinatingOnly; private Integer data; @@ -407,6 +407,11 @@ public final Builder transform(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterNodeCount}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodes.java index 372663a2a..4989cc4b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterNodes.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -280,7 +280,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterNodes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ClusterNodeCount count; private Map discoveryTypes; @@ -565,6 +565,11 @@ public final Builder versions(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterNodes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystem.java index 0593c3530..2109c5e91 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystem.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.List; @@ -181,7 +181,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterOperatingSystem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer allocatedProcessors; private Integer availableProcessors; @@ -319,6 +321,11 @@ public final Builder architectures( return architectures(fn.apply(new ClusterOperatingSystemArchitecture.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterOperatingSystem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemArchitecture.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemArchitecture.java index 6cce8aa99..520eb42a6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemArchitecture.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemArchitecture.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -106,7 +106,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterOperatingSystemArchitecture}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer count; private String arch; @@ -127,6 +129,11 @@ public final Builder arch(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterOperatingSystemArchitecture}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemName.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemName.java index 59b42ff81..0e22959f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemName.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemName.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterOperatingSystemName}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer count; private String name; @@ -126,6 +128,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterOperatingSystemName}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemPrettyName.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemPrettyName.java index fc526a7fd..12dbc5f10 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemPrettyName.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterOperatingSystemPrettyName.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -106,7 +106,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterOperatingSystemPrettyName}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer count; private String prettyName; @@ -127,6 +129,11 @@ public final Builder prettyName(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterOperatingSystemPrettyName}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcess.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcess.java index b13d27fd7..49e4c8574 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcess.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcess.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterProcess}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ClusterProcessCpu cpu; private ClusterProcessOpenFileDescriptors openFileDescriptors; @@ -139,6 +139,11 @@ public final Builder openFileDescriptors( return this.openFileDescriptors(fn.apply(new ClusterProcessOpenFileDescriptors.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterProcess}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessCpu.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessCpu.java index 3a15c3643..ef13a61da 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessCpu.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessCpu.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -90,7 +90,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterProcessCpu}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer percent; /** @@ -101,6 +101,11 @@ public final Builder percent(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterProcessCpu}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessOpenFileDescriptors.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessOpenFileDescriptors.java index fe71e3710..c60343983 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessOpenFileDescriptors.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessOpenFileDescriptors.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -117,7 +117,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterProcessOpenFileDescriptors}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Long avg; private Long max; @@ -148,6 +150,11 @@ public final Builder min(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterProcessOpenFileDescriptors}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessor.java index 2ca002845..936d1b92d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterProcessor.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -129,7 +129,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterProcessor}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long count; private Long current; @@ -170,6 +170,11 @@ public final Builder timeInMillis(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterProcessor}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterShardMetrics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterShardMetrics.java index d5d190009..8073abff7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterShardMetrics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/ClusterShardMetrics.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -116,7 +116,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClusterShardMetrics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double avg; private Double max; @@ -147,6 +149,11 @@ public final Builder min(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClusterShardMetrics}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypes.java index aa220608c..9b9ecc7db 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -135,7 +135,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldTypes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private Integer count; @@ -177,6 +177,11 @@ public final Builder scriptCount(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldTypes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypesMappings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypesMappings.java index 81417f9a7..6c7fbbfdb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypesMappings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/FieldTypesMappings.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -119,7 +119,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldTypesMappings}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List fieldTypes; @Nullable @@ -184,6 +186,11 @@ public final Builder runtimeFieldTypes( return runtimeFieldTypes(fn.apply(new RuntimeFieldTypes.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldTypesMappings}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/IndicesVersions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/IndicesVersions.java index ff513bc79..77f56dde9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/IndicesVersions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/IndicesVersions.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -132,7 +132,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesVersions}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer indexCount; private Integer primaryShardCount; @@ -173,6 +173,11 @@ public final Builder version(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesVersions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/NodePackagingType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/NodePackagingType.java index 22a16aa3f..fb422ee2b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/NodePackagingType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/NodePackagingType.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NodePackagingType}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer count; private String flavor; @@ -149,6 +149,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NodePackagingType}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/OperatingSystemMemoryInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/OperatingSystemMemoryInfo.java index 6c77cb405..7c7d40642 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/OperatingSystemMemoryInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/OperatingSystemMemoryInfo.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -143,7 +143,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link OperatingSystemMemoryInfo}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Long freeInBytes; private Integer freePercent; @@ -194,6 +196,11 @@ public final Builder usedPercent(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link OperatingSystemMemoryInfo}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/RuntimeFieldTypes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/RuntimeFieldTypes.java index 71b27be88..f1d1b1d7c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/RuntimeFieldTypes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/stats/RuntimeFieldTypes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -269,7 +269,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RuntimeFieldTypes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private Integer count; @@ -422,6 +422,11 @@ public final Builder docTotal(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RuntimeFieldTypes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkResponse.java index 3d860b4b4..3b27160f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -144,7 +144,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link BulkResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean errors; private List items; @@ -207,6 +207,11 @@ public final Builder ingestTook(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link BulkResponse}. * 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 9eb396ec0..fff2e5a9c 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 @@ -35,7 +35,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClearScrollRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private List scrollId; @@ -129,6 +131,11 @@ public final Builder scrollId(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClearScrollRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollResponse.java index 5f5cd2b17..8c4d6725b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClearScrollResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean succeeded; private Integer numFreed; @@ -124,6 +126,11 @@ public final Builder numFreed(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClearScrollResponse}. * 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 5202a8d8e..db386f320 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 @@ -35,7 +35,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; @@ -97,7 +97,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClosePointInTimeRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String id; /** @@ -108,6 +110,11 @@ public final Builder id(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClosePointInTimeRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeResponse.java index 85a64f37e..7461cd3dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -104,7 +104,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ClosePointInTimeResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean succeeded; private Integer numFreed; @@ -125,6 +127,11 @@ public final Builder numFreed(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ClosePointInTimeResponse}. * 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 6a79c2352..777b3fe1d 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -339,7 +339,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CountRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -620,6 +620,11 @@ public final Builder type(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CountRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountResponse.java index be0598761..334115caf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CountResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long count; private ShardStatistics shards; @@ -132,6 +132,11 @@ public final Builder shards(FunctionAPI * specification */ - +@JsonpDeserializable public class CreateRequest extends RequestBase implements JsonpSerializable { private final String id; @@ -249,7 +252,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CreateRequest}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { private String id; @@ -434,6 +437,20 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer withJson(JsonParser parser, JsonpMapper mapper) { + JsonpDeserializer tDocumentDeserializer = JsonData._DESERIALIZER; + + @SuppressWarnings("unchecked") + TDocument value = (TDocument) tDocumentDeserializer.deserialize(parser, mapper); + return this.document(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CreateRequest}. * @@ -447,6 +464,13 @@ public CreateRequest build() { } } + /** + * Json deserializer for {@link CreateRequest} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = createCreateRequestDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.create.TDocument")); + public static JsonpDeserializer> createCreateRequestDeserializer( JsonpDeserializer tDocumentDeserializer) { 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 4c89998bf..fa350f782 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 @@ -43,7 +43,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -592,7 +592,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DeleteByQueryRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -1178,6 +1180,11 @@ public final Builder waitForCompletion(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DeleteByQueryRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryResponse.java index cdf9c4f02..4a94b555e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Float; @@ -327,7 +327,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DeleteByQueryResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Long batches; @@ -511,6 +513,11 @@ public final Builder versionConflicts(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DeleteByQueryResponse}. * 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 2ad54a4d8..16a8edab9 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -312,7 +312,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExplainRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SourceConfigParam source; @@ -580,6 +580,11 @@ public final Builder type(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExplainRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainResponse.java index acf875527..3faa59929 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ExplainResponse.java @@ -35,7 +35,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -179,7 +179,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExplainResponse}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { private String index; @@ -273,6 +273,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link ExplainResponse}. * @@ -301,8 +306,9 @@ public static JsonpDeserializer> createEx * Json deserializer for {@link ExplainResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createExplainResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.explain.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createExplainResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.explain.TDocument"))); protected static void setupExplainResponseDeserializer( ObjectDeserializer> op, 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 a8cc1d6c6..6098db091 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -213,7 +213,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldCapsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -392,6 +392,11 @@ public final Builder runtimeMappings(String key, return runtimeMappings(key, fn.apply(new RuntimeField.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldCapsRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsResponse.java index 95204335b..548fff35c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -130,7 +130,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldCapsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List indices; private Map> fields; @@ -175,6 +175,11 @@ public final Builder fields(String key, Map value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldCapsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetResponse.java index 2633cb9d1..32facc619 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetResponse.java @@ -98,8 +98,9 @@ public static JsonpDeserializer> createGetRes * Json deserializer for {@link GetResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createGetResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.get.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createGetResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.get.TDocument"))); protected static void setupGetResponseDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextResponse.java index fd8aa0499..9e14932ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetScriptContextResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List contexts; /** @@ -132,6 +134,11 @@ public final Builder contexts(Function> return contexts(fn.apply(new Context.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetScriptContextResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesResponse.java index 714684460..3629d32fc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -121,7 +121,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetScriptLanguagesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List languageContexts; private List typesAllowed; @@ -175,6 +177,11 @@ public final Builder typesAllowed(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetScriptLanguagesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptResponse.java index 8054bcbf0..437ee2971 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -123,7 +123,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetScriptResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private Boolean found; @@ -162,6 +162,11 @@ public final Builder script(Function extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { private TDocument valueBody; @@ -118,6 +120,20 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer withJson(JsonParser parser, JsonpMapper mapper) { + JsonpDeserializer tDocumentDeserializer = JsonData._DESERIALIZER; + + @SuppressWarnings("unchecked") + TDocument value = (TDocument) tDocumentDeserializer.deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetSourceResponse}. * 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 fd691d6e6..3d22f1cee 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 @@ -30,20 +30,23 @@ import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.VersionType; import co.elastic.clients.elasticsearch._types.WaitForActiveShards; +import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.Boolean; import java.lang.Long; import java.lang.String; @@ -61,7 +64,7 @@ * @see API * specification */ - +@JsonpDeserializable public class IndexRequest extends RequestBase implements JsonpSerializable { @Nullable private final String id; @@ -310,7 +313,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { @Nullable private String id; @@ -550,6 +555,20 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer withJson(JsonParser parser, JsonpMapper mapper) { + JsonpDeserializer tDocumentDeserializer = JsonData._DESERIALIZER; + + @SuppressWarnings("unchecked") + TDocument value = (TDocument) tDocumentDeserializer.deserialize(parser, mapper); + return this.document(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRequest}. * @@ -563,6 +582,13 @@ public IndexRequest build() { } } + /** + * Json deserializer for {@link IndexRequest} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = createIndexRequestDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.index.TDocument")); + public static JsonpDeserializer> createIndexRequestDeserializer( JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java index 9ca84afcc..1c8ff161a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InfoResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String clusterName; private String clusterUuid; @@ -202,6 +202,11 @@ public final Builder version( return this.version(fn.apply(new ElasticsearchVersionInfo.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InfoResponse}. * 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 8234b2866..a61d7a558 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -282,7 +282,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MgetRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SourceConfigParam source; @@ -554,6 +554,11 @@ public final Builder type(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MgetRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetResponse.java index 15e538dd0..e4f7b76c5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetResponse.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -107,7 +107,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MgetResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { private List> docs; @Nullable @@ -153,6 +155,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link MgetResponse}. * @@ -181,8 +188,9 @@ public static JsonpDeserializer> createMgetR * Json deserializer for {@link MgetResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createMgetResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.mget.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createMgetResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.mget.TDocument"))); protected static void setupMgetResponseDeserializer( ObjectDeserializer> op, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchResponse.java index 86033b4c8..21b4ae7d1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchResponse.java @@ -98,8 +98,9 @@ public static JsonpDeserializer> createMs * Json deserializer for {@link MsearchResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createMsearchResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.msearch.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createMsearchResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.msearch.TDocument"))); protected static void setupMsearchResponseDeserializer( ObjectDeserializer> op, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateResponse.java index b252c6543..04bfb5615 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateResponse.java @@ -99,8 +99,9 @@ public static JsonpDeserializer> * Json deserializer for {@link MsearchTemplateResponse} based on named * deserializers provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createMsearchTemplateResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.msearch_template.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createMsearchTemplateResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.msearch_template.TDocument"))); protected static void setupMsearchTemplateResponseDeserializer( ObjectDeserializer> op, 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 e1f886961..cb99bc489 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -326,7 +326,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MtermvectorsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private List docs; @@ -582,6 +584,11 @@ public final Builder versionType(@Nullable VersionType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MtermvectorsRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsResponse.java index 2e3bb3697..6d037e3dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MtermvectorsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List docs; /** @@ -131,6 +133,11 @@ public final Builder docs(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String id; /** @@ -102,6 +104,11 @@ public final Builder id(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link OpenPointInTimeResponse}. * 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 7bce62d10..ba3cc7084 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -153,7 +153,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutScriptRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String context; @@ -240,6 +240,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutScriptRequest}. * 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 826dbbb43..da1f089aa 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -208,7 +208,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -375,6 +375,11 @@ public final Builder searchType(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalResponse.java index 02ffcf5e5..f8df1b304 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -142,7 +142,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Double metricScore; private Map details; @@ -218,6 +218,11 @@ public final Builder failures(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalResponse}. * 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 46f76bcd7..3f4070925 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 @@ -40,7 +40,7 @@ import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -311,7 +311,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReindexRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Conflicts conflicts; @@ -541,6 +541,11 @@ public final Builder waitForCompletion(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReindexRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexResponse.java index 6355fa357..5e991c3b7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexResponse.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -360,7 +360,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReindexResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Long batches; @@ -573,6 +573,11 @@ public final Builder versionConflicts(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReindexResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java index 230cef5f9..1d3dbb73f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -102,7 +102,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReindexRethrottleResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map nodes; /** @@ -134,6 +136,11 @@ public final Builder nodes(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String file; @@ -215,6 +217,11 @@ public final Builder source(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RenderSearchTemplateRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateResponse.java index 22729ed28..d5fdc52d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -102,7 +102,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RenderSearchTemplateResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map templateOutput; /** @@ -125,6 +127,11 @@ public final Builder templateOutput(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RenderSearchTemplateResponse}. * 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 4ecb2abd8..50d4819bc 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 @@ -36,7 +36,7 @@ import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; @@ -137,7 +137,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScriptsPainlessExecuteRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String context; @@ -186,6 +188,11 @@ public final Builder script(Function extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { private TResult result; @@ -124,6 +124,11 @@ public final Builder tResultSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link ScriptsPainlessExecuteResponse}. * @@ -153,8 +158,9 @@ public static JsonpDeserializer> _DESERIALIZER = createScriptsPainlessExecuteResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.scripts_painless_execute.TResult")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createScriptsPainlessExecuteResponseDeserializer(new NamedDeserializer<>( + "co.elastic.clients:Deserializer:_global.scripts_painless_execute.TResult"))); protected static void setupScriptsPainlessExecuteResponseDeserializer( ObjectDeserializer> op, 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 b7ca20e57..e3f55664a 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 @@ -36,7 +36,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ScrollRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Time scroll; @@ -153,6 +153,11 @@ public final Builder scrollId(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ScrollRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollResponse.java index f9d77fb67..b7a3fb391 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollResponse.java @@ -97,8 +97,9 @@ public static JsonpDeserializer> createScr * Json deserializer for {@link ScrollResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createScrollResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.scroll.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createScrollResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.scroll.TDocument"))); protected static void setupScrollResponseDeserializer( ObjectDeserializer> op, 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 550365395..3baeb921b 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 @@ -53,7 +53,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -1071,7 +1071,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SearchRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SourceConfig source; @@ -2153,6 +2153,11 @@ public final Builder version(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SearchRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchResponse.java index f96d6abc7..ca0452031 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchResponse.java @@ -42,7 +42,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -365,7 +365,7 @@ public SearchResponse build() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private Long took; private Boolean timedOut; @@ -644,8 +644,9 @@ public static JsonpDeserializer> createSea * Json deserializer for {@link SearchResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createSearchResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createSearchResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search.TDocument"))); protected static > void setupSearchResponseDeserializer( ObjectDeserializer op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsResponse.java index d6df1d9d7..35dbd4181 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsResponse.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -152,7 +152,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SearchShardsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map nodes; private List> shards; @@ -237,6 +239,11 @@ public final Builder indices(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -629,6 +631,11 @@ public final Builder type(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SearchTemplateRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateResponse.java index b1a94e113..45177b7f8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateResponse.java @@ -41,7 +41,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -322,7 +322,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SearchTemplateResponse}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { private Long took; @@ -563,6 +563,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link SearchTemplateResponse}. * @@ -591,8 +596,9 @@ public static JsonpDeserializer> c * Json deserializer for {@link SearchTemplateResponse} based on named * deserializers provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createSearchTemplateResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search_template.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createSearchTemplateResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search_template.TDocument"))); protected static void setupSearchTemplateResponseDeserializer( ObjectDeserializer> op, 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 3ade6067d..f33e61fad 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -236,7 +236,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermsEnumRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean caseInsensitive; @@ -364,6 +364,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermsEnumRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumResponse.java index bec0c3079..b6f87d13c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -126,7 +126,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermsEnumResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ShardStatistics shards; private List terms; @@ -176,6 +176,11 @@ public final Builder complete(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermsEnumResponse}. * 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 ddf07ce03..6e80a9094 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 @@ -33,13 +33,14 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -62,7 +63,7 @@ * @see API * specification */ - +@JsonpDeserializable public class TermvectorsRequest extends RequestBase implements JsonpSerializable { @Nullable private final TDocument doc; @@ -350,7 +351,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermvectorsRequest}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { @Nullable @@ -615,6 +616,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link TermvectorsRequest}. * @@ -639,6 +645,14 @@ public static JsonpDeserializer> creat op -> TermvectorsRequest.setupTermvectorsRequestDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link TermvectorsRequest} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createTermvectorsRequestDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.termvectors.TDocument"))); + protected static void setupTermvectorsRequestDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java index bc8b6ac30..f0987ece4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -184,7 +184,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermvectorsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean found; private String id; @@ -278,6 +280,11 @@ public final Builder version(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermvectorsResponse}. * 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 c069be825..fb9e0163e 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 @@ -44,7 +44,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -629,7 +629,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateByQueryRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -1246,6 +1248,11 @@ public final Builder waitForCompletion(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateByQueryRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryResponse.java index ca3af7acf..54a4a8d5f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Float; @@ -327,7 +327,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateByQueryResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Long batches; @@ -511,6 +513,11 @@ public final Builder throttledUntilMillis(@Nullable Number value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateByQueryResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleResponse.java index 65604e571..5d7200158 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -103,7 +103,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateByQueryRethrottleResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map nodes; /** @@ -136,6 +138,11 @@ public final Builder nodes(String key, return nodes(key, fn.apply(new UpdateByQueryRethrottleNode.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateByQueryRethrottleResponse}. * 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 1dd56368c..84a045b56 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 @@ -36,13 +36,14 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -63,7 +64,7 @@ * @see API * specification */ - +@JsonpDeserializable public class UpdateRequest extends RequestBase implements JsonpSerializable { @Nullable private final SourceConfig source; @@ -413,7 +414,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateRequest}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder + extends + WithJsonObjectBuilderBase> implements ObjectBuilder> { @Nullable @@ -742,6 +745,11 @@ public final Builder tPartialDocumentSerializer( return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateRequest}. * @@ -768,6 +776,15 @@ public static JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createUpdateRequestDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.update.TDocument"), + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.update.TPartialDocument"))); + protected static void setupUpdateRequestDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateResponse.java index f519b232c..d85c50a6c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateResponse.java @@ -161,8 +161,9 @@ public static JsonpDeserializer> createUpd * Json deserializer for {@link UpdateResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createUpdateResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.update.TDocument")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createUpdateResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.update.TDocument"))); protected static void setupUpdateResponseDeserializer( ObjectDeserializer> op, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperation.java index 331ff7b26..1f3d38f86 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperation.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.util.Iterator; @@ -206,10 +206,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder index(IndexOperation v) { this._kind = Kind.Index; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java index f1b6e33ad..3f49e301b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkOperationBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -188,7 +188,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String id; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java index 2863793e0..f2282b78a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java @@ -35,7 +35,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -297,7 +297,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link BulkResponseItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private OperationType operationType; /** @@ -460,6 +460,11 @@ public final Builder get( return this.get(fn.apply(new InlineGet.Builder>()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link BulkResponseItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateAction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateAction.java index 34558a512..d0099d241 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateAction.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/UpdateAction.java @@ -31,10 +31,11 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -49,7 +50,7 @@ * @see API * specification */ - +@JsonpDeserializable public class UpdateAction implements JsonpSerializable { @Nullable private final Boolean detectNoop; @@ -227,7 +228,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateAction}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder + extends + WithJsonObjectBuilderBase> implements ObjectBuilder> { @Nullable @@ -370,6 +373,11 @@ public final Builder tPartialDocumentSerializer( return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateAction}. * @@ -396,6 +404,15 @@ public static JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createUpdateActionDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.bulk.TDocument"), + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.bulk.TPartialDocument"))); + protected static void setupUpdateActionDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java index a30db6415..ce06a850e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/WriteOperation.java @@ -30,6 +30,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/Explanation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/Explanation.java index a5ee71639..38d65022e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/Explanation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/Explanation.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.lang.String; @@ -125,7 +125,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Explanation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String description; private List details; @@ -177,6 +177,11 @@ public final Builder value(float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Explanation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/ExplanationDetail.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/ExplanationDetail.java index 11b05ed8d..64a401971 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/ExplanationDetail.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/explain/ExplanationDetail.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.lang.String; @@ -126,7 +126,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExplanationDetail}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String description; @Nullable @@ -179,6 +179,11 @@ public final Builder value(float value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExplanationDetail}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/field_caps/FieldCapability.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/field_caps/FieldCapability.java index af9500128..67ae92746 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/field_caps/FieldCapability.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/field_caps/FieldCapability.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -226,7 +226,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldCapability}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean aggregatable; @Nullable @@ -361,6 +361,11 @@ public final Builder metadataField(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldCapability}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java index f004843d9..cde7a6e07 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java @@ -30,11 +30,12 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -52,7 +53,7 @@ * @see API * specification */ - +@JsonpDeserializable public class GetResult implements JsonpSerializable { private final String index; @@ -278,7 +279,7 @@ public GetResult build() { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private String index; @Nullable @@ -428,6 +429,14 @@ public static JsonpDeserializer> createGetResul op -> GetResult.setupGetResultDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link GetResult} based on named deserializers provided + * by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createGetResultDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.get.TDocument"))); + protected static > void setupGetResultDeserializer( ObjectDeserializer op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/Context.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/Context.java index 2ab83e341..eb7e8bf7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/Context.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/Context.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -112,7 +112,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Context}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List methods; private String name; @@ -154,6 +154,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Context}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/ContextMethod.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/ContextMethod.java index 02eccefef..d755d0d7d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/ContextMethod.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_context/ContextMethod.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -126,7 +126,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ContextMethod}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private String returnType; @@ -178,6 +178,11 @@ public final Builder params(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private String type; @@ -125,6 +127,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ContextMethodParam}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_languages/LanguageContext.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_languages/LanguageContext.java index d785b9552..43407ea84 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_languages/LanguageContext.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/get_script_languages/LanguageContext.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -112,7 +112,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LanguageContext}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List contexts; private String language; @@ -145,6 +145,11 @@ public final Builder language(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LanguageContext}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetError.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetError.java index 34a902923..fcdbff852 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetError.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetError.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -138,7 +138,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultiGetError}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ErrorCause error; private String id; @@ -190,6 +190,11 @@ public final Builder type(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultiGetError}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetOperation.java index 63e7ba471..108468a77 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mget/MultiGetOperation.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -227,7 +227,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultiGetOperation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; @Nullable @@ -349,6 +349,11 @@ public final Builder versionType(@Nullable VersionType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultiGetOperation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchItem.java index 674fe56ee..dca0a19dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchItem.java @@ -27,6 +27,7 @@ import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; @@ -45,7 +46,7 @@ * "../../doc-files/api-spec.html#_global.msearch.MultiSearchItem">API * specification */ - +@JsonpDeserializable public class MultiSearchItem extends SearchResponse { @Nullable private final Integer status; @@ -132,6 +133,14 @@ public static JsonpDeserializer> createMu op -> MultiSearchItem.setupMultiSearchItemDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link MultiSearchItem} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createMultiSearchItemDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.msearch.TDocument"))); + protected static void setupMultiSearchItemDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchResult.java index 47a25ce3d..89af79b29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchResult.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultiSearchResult.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.List; @@ -110,7 +110,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private Long took; private List> responses; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java index 0a1cb4445..c465953c2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchBody.java @@ -36,7 +36,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -209,7 +209,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultisearchBody}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map aggregations; @@ -336,6 +336,11 @@ public final Builder suggest(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -338,6 +338,11 @@ public final Builder searchType(@Nullable SearchType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultisearchHeader}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java index 97ed0bf7d..dc9c8c060 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch_template/TemplateConfig.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -178,7 +178,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TemplateConfig}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean explain; @@ -253,6 +253,11 @@ public final Builder source(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TemplateConfig}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java index 8bd185846..c37b386c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsOperation.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -260,7 +260,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultiTermVectorsOperation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private JsonData doc; private List fields; @@ -410,6 +412,11 @@ public final Builder versionType(VersionType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultiTermVectorsOperation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsResult.java index d2d9c824b..21097a864 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsResult.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/mtermvectors/MultiTermVectorsResult.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -168,7 +168,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MultiTermVectorsResult}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean found; private String id; @@ -250,6 +252,11 @@ public final Builder version(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MultiTermVectorsResult}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/DocumentRating.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/DocumentRating.java index 8a789d733..6220a1cf0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/DocumentRating.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/DocumentRating.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -125,7 +125,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DocumentRating}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private String index; @@ -163,6 +163,11 @@ public final Builder rating(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DocumentRating}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHit.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHit.java index f0c563c91..f160b4816 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHit.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHit.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -135,7 +135,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalHit}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private String index; @@ -177,6 +177,11 @@ public final Builder score(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalHit}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHitItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHitItem.java index cc4b1db13..f7b16c108 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHitItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalHitItem.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -112,7 +112,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalHitItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private RankEvalHit hit; @Nullable @@ -144,6 +144,11 @@ public final Builder rating(@Nullable Double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalHitItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetric.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetric.java index 87fce3b17..2a8fa43bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetric.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetric.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -162,7 +162,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalMetric}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private RankEvalMetricPrecision precision; @@ -257,6 +257,11 @@ public final Builder expectedReciprocalRank( return this.expectedReciprocalRank(fn.apply(new RankEvalMetricExpectedReciprocalRank.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalMetric}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricBase.java index 016eb7efe..d5efa2d96 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricBase.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -89,7 +89,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private Integer k; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDetail.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDetail.java index 0d924043b..1357b2392 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDetail.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricDetail.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -180,7 +180,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalMetricDetail}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double metricScore; private List unratedDocs; @@ -309,6 +311,11 @@ public final Builder metricDetails(String key, Map value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalMetricDetail}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRatingTreshold.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRatingTreshold.java index bf5b617f8..50d06ef0b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRatingTreshold.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalMetricRatingTreshold.java @@ -29,6 +29,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java index b3cf48a9d..3706286c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -110,7 +110,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalQuery}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Query query; @Nullable @@ -139,6 +139,11 @@ public final Builder size(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalQuery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalRequestItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalRequestItem.java index f98b536b2..ba312033d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalRequestItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalRequestItem.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -180,7 +180,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RankEvalRequestItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String id; @Nullable @@ -292,6 +294,11 @@ public final Builder params(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RankEvalRequestItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/UnratedDocument.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/UnratedDocument.java index 60f7551cb..76950cf6e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/UnratedDocument.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/UnratedDocument.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UnratedDocument}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String id; private String index; @@ -125,6 +125,11 @@ public final Builder index(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UnratedDocument}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Destination.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Destination.java index deb2337ad..2dddb8bc8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Destination.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Destination.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -169,7 +169,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Destination}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String index; @@ -232,6 +232,11 @@ public final Builder versionType(@Nullable VersionType value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Destination}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/RemoteSource.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/RemoteSource.java index 6b4222443..538b124aa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/RemoteSource.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/RemoteSource.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RemoteSource}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Time connectTimeout; private String host; @@ -208,6 +208,11 @@ public final Builder socketTimeout(Function> f return this.socketTimeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RemoteSource}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Source.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Source.java index e7b49fb87..015b5af7e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Source.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex/Source.java @@ -35,7 +35,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -234,7 +234,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Source}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List index; @Nullable @@ -410,6 +410,11 @@ public final Builder runtimeMappings(String key, return runtimeMappings(key, fn.apply(new RuntimeField.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Source}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java index a4eb686a0..cb0de3a32 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexStatus.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.lang.Long; @@ -224,7 +224,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReindexStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long batches; private Long created; @@ -342,6 +342,11 @@ public final Builder versionConflicts(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReindexStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java index 83f3df4df..19feffc75 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -228,7 +228,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReindexTask}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String action; private Boolean cancellable; @@ -348,6 +348,11 @@ public final Builder headers(String key, List value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReindexTask}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java index 7de8279a3..4c72e20d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/scripts_painless_execute/PainlessContextSetup.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -119,7 +119,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PainlessContextSetup}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private JsonData document; private String index; @@ -157,6 +159,11 @@ public final Builder query(Function> fn) { return this.query(fn.apply(new Query.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PainlessContextSetup}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationBreakdown.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationBreakdown.java index 834cf9f2a..69c8a4ffc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationBreakdown.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationBreakdown.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -244,7 +244,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AggregationBreakdown}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Long buildAggregation; private Long buildAggregationCount; @@ -367,6 +369,11 @@ public final Builder reduceCount(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AggregationBreakdown}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfile.java index c1628cd22..8b3f1d600 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -170,7 +170,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AggregationProfile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private AggregationBreakdown breakdown; private String description; @@ -269,6 +271,11 @@ public final Builder children(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Integer segmentsWithMultiValuedOrds; @@ -722,6 +724,11 @@ public final Builder deferredAggregators(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AggregationProfileDebug}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebug.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebug.java index 994deaf54..29b9cfdfd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebug.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebug.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.List; @@ -169,7 +169,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AggregationProfileDelegateDebug}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Integer segmentsWithDocCountField; @@ -248,6 +250,11 @@ public final Builder segmentsCollected(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AggregationProfileDelegateDebug}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebugFilter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebugFilter.java index c8874487f..211e44b47 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebugFilter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/AggregationProfileDelegateDebugFilter.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -131,7 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AggregationProfileDelegateDebugFilter}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable @@ -167,6 +167,11 @@ public final Builder specializedFor(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AggregationProfileDelegateDebugFilter}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Collector.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Collector.java index febd2fdbc..eff1df9c6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Collector.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Collector.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -140,7 +140,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Collector}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private String reason; @@ -203,6 +203,11 @@ public final Builder children(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Double boost; @@ -256,6 +256,11 @@ public final Builder prefix(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CompletionContext}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggest.java index 8dcae1a1e..cd49cb512 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggest.java @@ -27,6 +27,7 @@ import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializer; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; @@ -46,7 +47,7 @@ * "../../doc-files/api-spec.html#_global.search._types.CompletionSuggest">API * specification */ - +@JsonpDeserializable public class CompletionSuggest extends SuggestBase implements SuggestionVariant { private final List> options; @@ -182,6 +183,14 @@ public static JsonpDeserializer> create op -> CompletionSuggest.setupCompletionSuggestDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link CompletionSuggest} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createCompletionSuggestDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search._types.TDocument"))); + protected static void setupCompletionSuggestDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggestOption.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggestOption.java index 37f312f35..c80a62d5c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggestOption.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionSuggestOption.java @@ -30,11 +30,12 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -54,7 +55,7 @@ * "../../doc-files/api-spec.html#_global.search._types.CompletionSuggestOption">API * specification */ - +@JsonpDeserializable public class CompletionSuggestOption implements JsonpSerializable { @Nullable private final Boolean collateMatch; @@ -264,7 +265,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CompletionSuggestOption}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase> implements ObjectBuilder> { @Nullable @@ -410,6 +411,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link CompletionSuggestOption}. * @@ -434,6 +440,14 @@ public static JsonpDeserializer> op -> CompletionSuggestOption.setupCompletionSuggestOptionDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link CompletionSuggestOption} based on named + * deserializers provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createCompletionSuggestOptionDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search._types.TDocument"))); + protected static void setupCompletionSuggestOptionDeserializer( ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/DirectGenerator.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/DirectGenerator.java index 10ebe8e30..5aa95b868 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/DirectGenerator.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/DirectGenerator.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Float; import java.lang.Integer; @@ -264,7 +264,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DirectGenerator}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; @Nullable @@ -385,6 +385,11 @@ public final Builder suggestMode(@Nullable SuggestMode value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DirectGenerator}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfile.java index c4edbe9b2..1b1d1b51b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -170,7 +170,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FetchProfile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String type; private String description; @@ -269,6 +269,11 @@ public final Builder children(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Integer loadStoredFields; @@ -247,6 +249,11 @@ public final Builder process(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FetchProfileBreakdown}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfileDebug.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfileDebug.java index afdaf85f9..0d575c436 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfileDebug.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FetchProfileDebug.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FetchProfileDebug}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List storedFields; @@ -153,6 +153,11 @@ public final Builder fastPath(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FetchProfileDebug}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldCollapse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldCollapse.java index 43ae60a24..e08706248 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldCollapse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldCollapse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -131,7 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldCollapse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; @Nullable @@ -185,6 +185,11 @@ public final Builder maxConcurrentGroupSearches(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldCollapse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldSuggester.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldSuggester.java index d403956cc..d0178d13b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldSuggester.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/FieldSuggester.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Object; import java.lang.String; @@ -254,10 +254,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder completion(CompletionSuggester v) { this._kind = Kind.Completion; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Highlight.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Highlight.java index be16109e5..7037984a9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Highlight.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Highlight.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -429,7 +429,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Highlight}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map fields; @Nullable @@ -708,6 +708,11 @@ public final Builder maxAnalyzedOffset(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Highlight}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HighlightField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HighlightField.java index 01a21bd11..b027854e6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HighlightField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HighlightField.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -445,7 +445,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HighlightField}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String boundaryChars; @@ -727,6 +727,11 @@ public final Builder type(FunctionAPI * specification */ - +@JsonpDeserializable public class Hit implements JsonpSerializable { private final String index; @@ -434,7 +435,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Hit}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { private String index; private String id; @@ -750,6 +753,11 @@ public final Builder tDocumentSerializer(@Nullable JsonpSerializer self() { + return this; + } + /** * Builds a {@link Hit}. * @@ -774,6 +782,14 @@ public static JsonpDeserializer> createHitDeserialize op -> Hit.setupHitDeserializer(op, tDocumentDeserializer)); }; + /** + * Json deserializer for {@link Hit} based on named deserializers provided by + * the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createHitDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search._types.TDocument"))); + protected static void setupHitDeserializer(ObjectDeserializer> op, JsonpDeserializer tDocumentDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HitsMetadata.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HitsMetadata.java index 6c4fdd75d..278167201 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HitsMetadata.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/HitsMetadata.java @@ -28,11 +28,12 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.List; @@ -49,7 +50,7 @@ * "../../doc-files/api-spec.html#_global.search._types.HitsMetadata">API * specification */ - +@JsonpDeserializable public class HitsMetadata implements JsonpSerializable { @Nullable private final TotalHits total; @@ -143,7 +144,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HitsMetadata}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { @Nullable private TotalHits total; @@ -222,6 +225,11 @@ public final Builder tSerializer(@Nullable JsonpSerializer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HitsMetadata}. * @@ -246,6 +254,14 @@ public static JsonpDeserializer> createHitsMetadataDeseriali op -> HitsMetadata.setupHitsMetadataDeserializer(op, tDeserializer)); }; + /** + * Json deserializer for {@link HitsMetadata} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createHitsMetadataDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:_global.search._types.T"))); + protected static void setupHitsMetadataDeserializer(ObjectDeserializer> op, JsonpDeserializer tDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java index 0c1a6e731..afad7c7b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -374,7 +374,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InnerHits}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String name; @@ -659,6 +659,11 @@ public final Builder version(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InnerHits}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHitsResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHitsResult.java index e7f7916fa..4ad151367 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHitsResult.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHitsResult.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link InnerHitsResult}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private HitsMetadata hits; /** @@ -109,6 +109,11 @@ public final Builder hits(Function, ObjectBuilder return this.hits(fn.apply(new HitsMetadata.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link InnerHitsResult}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LaplaceSmoothingModel.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LaplaceSmoothingModel.java index f317d7e69..d1632042d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LaplaceSmoothingModel.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LaplaceSmoothingModel.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -98,7 +98,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LaplaceSmoothingModel}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double alpha; /** @@ -109,6 +111,11 @@ public final Builder alpha(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LaplaceSmoothingModel}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LinearInterpolationSmoothingModel.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LinearInterpolationSmoothingModel.java index 7d90dfe8b..a3419d907 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LinearInterpolationSmoothingModel.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/LinearInterpolationSmoothingModel.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -125,7 +125,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LinearInterpolationSmoothingModel}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double bigramLambda; private Double trigramLambda; @@ -156,6 +158,11 @@ public final Builder unigramLambda(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LinearInterpolationSmoothingModel}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/NestedIdentity.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/NestedIdentity.java index f5140385f..178f0f6f2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/NestedIdentity.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/NestedIdentity.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -123,7 +123,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link NestedIdentity}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; private Integer offset; @@ -162,6 +162,11 @@ public final Builder nested(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map params; @@ -185,6 +187,11 @@ public final Builder query( return this.query(fn.apply(new PhraseSuggestCollateQuery.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PhraseSuggestCollate}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestCollateQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestCollateQuery.java index 1cff9344c..facbd7269 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestCollateQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestCollateQuery.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -112,7 +112,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PhraseSuggestCollateQuery}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String id; @@ -135,6 +137,11 @@ public final Builder source(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PhraseSuggestCollateQuery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestHighlight.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestHighlight.java index 0b442d417..b62253331 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestHighlight.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestHighlight.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PhraseSuggestHighlight}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String postTag; private String preTag; @@ -125,6 +127,11 @@ public final Builder preTag(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PhraseSuggestHighlight}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestOption.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestOption.java index 8e3fee2cd..26d6cfc20 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestOption.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PhraseSuggestOption.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -118,7 +118,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PhraseSuggestOption}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String text; private String highlighted; @@ -149,6 +151,11 @@ public final Builder score(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PhraseSuggestOption}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PointInTimeReference.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PointInTimeReference.java index 586cdcfaa..d313ab962 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PointInTimeReference.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/PointInTimeReference.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -110,7 +110,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PointInTimeReference}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String id; @Nullable @@ -139,6 +141,11 @@ public final Builder keepAlive(Function> fn) { return this.keepAlive(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PointInTimeReference}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Profile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Profile.java index e69282db9..373dc828c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Profile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Profile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Profile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List shards; /** @@ -131,6 +131,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long advance; private Long advanceCount; @@ -496,6 +496,11 @@ public final Builder setMinCompetitiveScoreCount(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link QueryBreakdown}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/QueryProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/QueryProfile.java index eb7b707a5..4123e8774 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/QueryProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/QueryProfile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -153,7 +153,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link QueryProfile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private QueryBreakdown breakdown; private String description; @@ -233,6 +233,11 @@ public final Builder children(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private RescoreQuery query; @Nullable @@ -138,6 +138,11 @@ public final Builder windowSize(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Rescore}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/RescoreQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/RescoreQuery.java index 9f4a14cdd..9fab2040a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/RescoreQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/RescoreQuery.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RescoreQuery}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Query query; @Nullable @@ -194,6 +194,11 @@ public final Builder scoreMode(@Nullable ScoreMode value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RescoreQuery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchProfile.java index 97593ca85..beb9decf3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchProfile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.List; @@ -132,7 +132,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SearchProfile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List collector; private List query; @@ -205,6 +205,11 @@ public final Builder rewriteTime(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SearchProfile}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java index f2a1b25f8..9f86672f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -150,7 +150,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardProfile}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List aggregations; private String id; @@ -241,6 +241,11 @@ public final Builder fetch(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private Object _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder laplace(LaplaceSmoothingModel v) { this._kind = Kind.Laplace; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceFilter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceFilter.java index ca50463a0..03d1ee2ef 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceFilter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SourceFilter.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -120,7 +120,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SourceFilter}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List excludes; @@ -167,6 +167,11 @@ public final Builder includes(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SourceFilter}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/StupidBackoffSmoothingModel.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/StupidBackoffSmoothingModel.java index 078e0b849..6d8fcdb37 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/StupidBackoffSmoothingModel.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/StupidBackoffSmoothingModel.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.util.Objects; @@ -98,7 +98,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StupidBackoffSmoothingModel}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double discount; /** @@ -109,6 +111,11 @@ public final Builder discount(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StupidBackoffSmoothingModel}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestBase.java index da1d9bd9d..5223244b8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -109,7 +109,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private Integer length; private Integer offset; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestFuzziness.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestFuzziness.java index 28bf9ece1..76e87b978 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestFuzziness.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggestFuzziness.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -145,7 +145,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SuggestFuzziness}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String fuzziness; private Integer minLength; @@ -196,6 +196,11 @@ public final Builder unicodeAware(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SuggestFuzziness}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Suggester.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Suggester.java index a7bbf6455..ee7eb2c5b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Suggester.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/Suggester.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Suggester}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map suggesters = new HashMap<>(); @@ -166,6 +166,11 @@ public final Builder text(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Suggester}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggesterBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggesterBase.java index fab9b9ce3..0f6b1250c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggesterBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SuggesterBase.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { private String field; @Nullable diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TermSuggestOption.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TermSuggestOption.java index c0ad055cf..9c0ee1b5b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TermSuggestOption.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TermSuggestOption.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; @@ -119,7 +119,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermSuggestOption}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String text; private Long freq; @@ -150,6 +150,11 @@ public final Builder score(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TermSuggestOption}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TotalHits.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TotalHits.java index 205c03405..6964c7cf8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TotalHits.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/TotalHits.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.util.Objects; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TotalHits}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private TotalHitsRelation relation; private Long value; @@ -124,6 +124,11 @@ public final Builder value(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TotalHits}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search_shards/ShardStoreIndex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search_shards/ShardStoreIndex.java index f3b354c46..60784ae7f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search_shards/ShardStoreIndex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search_shards/ShardStoreIndex.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStoreIndex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List aliases; @@ -160,6 +160,11 @@ public final Builder filter(Function> fn) { return this.filter(fn.apply(new Query.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStoreIndex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/FieldStatistics.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/FieldStatistics.java index b7b528ae6..b22d2fe23 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/FieldStatistics.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/FieldStatistics.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -117,7 +117,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FieldStatistics}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer docCount; private Long sumDocFreq; @@ -148,6 +148,11 @@ public final Builder sumTtf(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FieldStatistics}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java index 864353db0..e59273b7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Filter.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.util.Objects; @@ -196,7 +196,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Filter}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer maxDocFreq; @@ -274,6 +274,11 @@ public final Builder minWordLength(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Filter}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Term.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Term.java index 9790822f7..14e451f7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Term.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/Term.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Integer; @@ -164,7 +164,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Term}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer docFreq; @@ -239,6 +239,11 @@ public final Builder ttf(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Term}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/TermVector.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/TermVector.java index e2b3f28d7..cbbf9a00b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/TermVector.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/termvectors/TermVector.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -114,7 +114,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TermVector}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private FieldStatistics fieldStatistics; private Map terms; @@ -163,6 +163,11 @@ public final Builder terms(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Integer endOffset; @@ -187,6 +187,11 @@ public final Builder startOffset(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Token}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesResponse.java index dbbba5ad8..e97088700 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ListDanglingIndicesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List danglingIndices; /** @@ -132,6 +134,11 @@ public final Builder danglingIndices(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String indexName; private String indexUuid; @@ -192,6 +192,11 @@ public final Builder nodeIds(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DanglingIndex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichConfiguration.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichConfiguration.java index be9fa7298..39df0e344 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichConfiguration.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichConfiguration.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -106,7 +106,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link EnrichConfiguration}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private EnrichPolicy geoMatch; @@ -142,6 +144,11 @@ public final Builder match(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List enrichFields; private List indices; @@ -243,6 +243,11 @@ public final Builder name(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link EnrichPolicy}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsResponse.java index fbef3b6b0..8a49fb6f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsResponse.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -142,7 +142,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link EnrichStatsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List coordinatorStats; private List executingPolicies; @@ -237,6 +239,11 @@ public final Builder cacheStats(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private EnrichConfiguration config; /** @@ -107,6 +107,11 @@ public final Builder config(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ExecuteEnrichPolicyStatus status; @Nullable @@ -139,6 +141,11 @@ public final Builder taskId(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExecutePolicyResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyResponse.java index f3d08f4c2..61fa6556b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -98,7 +98,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetPolicyResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List policies; /** @@ -130,6 +130,11 @@ public final Builder policies(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private EnrichPolicy geoMatch; @@ -179,6 +179,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutPolicyRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/execute_policy/ExecuteEnrichPolicyStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/execute_policy/ExecuteEnrichPolicyStatus.java index a8241b53e..f7c406365 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/execute_policy/ExecuteEnrichPolicyStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/execute_policy/ExecuteEnrichPolicyStatus.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -90,7 +90,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExecuteEnrichPolicyStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private EnrichPolicyPhase phase; /** @@ -101,6 +103,11 @@ public final Builder phase(EnrichPolicyPhase value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExecuteEnrichPolicyStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java index 08ebfa8bb..c1b386594 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CacheStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CacheStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String nodeId; private Integer count; @@ -194,6 +194,11 @@ public final Builder evictions(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CacheStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CoordinatorStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CoordinatorStats.java index 171c6724e..9ab8e36b8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CoordinatorStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/CoordinatorStats.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -148,7 +148,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CoordinatorStats}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long executedSearchesTotal; private String nodeId; @@ -199,6 +199,11 @@ public final Builder remoteRequestsTotal(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CoordinatorStats}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/ExecutingPolicy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/ExecutingPolicy.java index 6c7e949b5..48b42e585 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/ExecutingPolicy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/stats/ExecutingPolicy.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExecutingPolicy}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private Info task; @@ -132,6 +132,11 @@ public final Builder task(Function> fn) { return this.task(fn.apply(new Info.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExecutingPolicy}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetResponse.java index 996eaae21..2d531d700 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetResponse.java @@ -97,8 +97,9 @@ public static JsonpDeserializer> createEqlGetRes * Json deserializer for {@link EqlGetResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createEqlGetResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:eql.get.TEvent")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createEqlGetResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:eql.get.TEvent"))); protected static void setupEqlGetResponseDeserializer( ObjectDeserializer> op, JsonpDeserializer tEventDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlHits.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlHits.java index 08ee5ba94..f8309db72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlHits.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlHits.java @@ -29,11 +29,12 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -48,7 +49,7 @@ * @see API * specification */ - +@JsonpDeserializable public class EqlHits implements JsonpSerializable { @Nullable private final TotalHits total; @@ -150,7 +151,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link EqlHits}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { @Nullable private TotalHits total; @@ -268,6 +271,11 @@ public final Builder tEventSerializer(@Nullable JsonpSerializer return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link EqlHits}. * @@ -292,6 +300,14 @@ public static JsonpDeserializer> createEqlHitsDeseriali op -> EqlHits.setupEqlHitsDeserializer(op, tEventDeserializer)); }; + /** + * Json deserializer for {@link EqlHits} based on named deserializers provided + * by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createEqlHitsDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:eql._types.TEvent"))); + protected static void setupEqlHitsDeserializer(ObjectDeserializer> op, JsonpDeserializer tEventDeserializer) { 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 21e699b42..c610cc40b 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 @@ -40,7 +40,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Number; @@ -380,7 +380,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link EqlSearchRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -652,6 +652,11 @@ public final Builder waitForCompletionTimeout(Function JsonpDeserializer> createEqlSea * Json deserializer for {@link EqlSearchResponse} based on named deserializers * provided by the calling {@code JsonMapper}. */ - public static final JsonpDeserializer> _DESERIALIZER = createEqlSearchResponseDeserializer( - new NamedDeserializer<>("co.elastic.clients:Deserializer:eql.search.TEvent")); + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createEqlSearchResponseDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:eql.search.TEvent"))); protected static void setupEqlSearchResponseDeserializer( ObjectDeserializer> op, JsonpDeserializer tEventDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchResponseBase.java index d6565566d..357d1ff6f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchResponseBase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -191,7 +191,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { protected abstract static class AbstractBuilder> extends - ObjectBuilderBase { + WithJsonObjectBuilderBase { @Nullable private String id; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusResponse.java index 49f4d7b2b..4b460d9dd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -189,7 +189,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetEqlStatusResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String id; private Boolean isPartial; @@ -272,6 +274,11 @@ public final Builder completionStatus(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetEqlStatusResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsEvent.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsEvent.java index 6ff53c57c..348685991 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsEvent.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsEvent.java @@ -30,11 +30,12 @@ import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -51,7 +52,7 @@ * @see API * specification */ - +@JsonpDeserializable public class HitsEvent implements JsonpSerializable { private final String index; @@ -162,7 +163,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HitsEvent}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { private String index; private String id; @@ -235,6 +238,11 @@ public final Builder tEventSerializer(@Nullable JsonpSerializer return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HitsEvent}. * @@ -259,6 +267,14 @@ public static JsonpDeserializer> createHitsEventDeser op -> HitsEvent.setupHitsEventDeserializer(op, tEventDeserializer)); }; + /** + * Json deserializer for {@link HitsEvent} based on named deserializers provided + * by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createHitsEventDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:eql._types.TEvent"))); + protected static void setupHitsEventDeserializer(ObjectDeserializer> op, JsonpDeserializer tEventDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsSequence.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsSequence.java index 16008ece8..2d2fe01ba 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsSequence.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/HitsSequence.java @@ -29,11 +29,12 @@ import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; +import co.elastic.clients.json.NamedDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -48,7 +49,7 @@ * @see API * specification */ - +@JsonpDeserializable public class HitsSequence implements JsonpSerializable { private final List> events; @@ -131,7 +132,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link HitsSequence}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder> { + public static class Builder extends WithJsonObjectBuilderBase> + implements + ObjectBuilder> { private List> events; private List joinKeys; @@ -212,6 +215,11 @@ public final Builder tEventSerializer(@Nullable JsonpSerializer return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link HitsSequence}. * @@ -236,6 +244,14 @@ public static JsonpDeserializer> createHitsSequenc op -> HitsSequence.setupHitsSequenceDeserializer(op, tEventDeserializer)); }; + /** + * Json deserializer for {@link HitsSequence} based on named deserializers + * provided by the calling {@code JsonMapper}. + */ + public static final JsonpDeserializer> _DESERIALIZER = JsonpDeserializer + .lazy(() -> createHitsSequenceDeserializer( + new NamedDeserializer<>("co.elastic.clients:Deserializer:eql._types.TEvent"))); + protected static void setupHitsSequenceDeserializer(ObjectDeserializer> op, JsonpDeserializer tEventDeserializer) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/Feature.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/Feature.java index 90448881e..2e2073d63 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/Feature.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/Feature.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -103,7 +103,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Feature}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private String description; @@ -124,6 +124,11 @@ public final Builder description(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Feature}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesResponse.java index 68e3172c8..dff694609 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/GetFeaturesResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -98,7 +98,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetFeaturesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List features; /** @@ -130,6 +132,11 @@ public final Builder features(Function> return features(fn.apply(new Feature.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetFeaturesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesResponse.java index 6d7be4bcb..1e1c04216 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/features/ResetFeaturesResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ResetFeaturesResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List features; /** @@ -131,6 +133,11 @@ public final Builder features(Function> return features(fn.apply(new Feature.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResetFeaturesResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Connection.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Connection.java index 50f5bc3d4..91e806154 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Connection.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Connection.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; @@ -129,7 +129,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Connection}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long docCount; private Long source; @@ -170,6 +170,11 @@ public final Builder weight(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Connection}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreControls.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreControls.java index f1409b605..4ce615f68 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreControls.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreControls.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -143,7 +143,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExploreControls}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private SampleDiversity sampleDiversity; @@ -201,6 +201,11 @@ public final Builder useSignificance(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExploreControls}. * 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 113bbab33..114ea7612 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -215,7 +215,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExploreRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Hop connections; @@ -394,6 +394,11 @@ public final Builder vertices(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List connections; private List failures; @@ -281,6 +281,11 @@ public final Builder vertices(Function> fn return vertices(fn.apply(new Vertex.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExploreResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Hop.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Hop.java index 7a9941731..c05ed6faa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Hop.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Hop.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -129,7 +129,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Hop}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Hop connections; @@ -196,6 +196,11 @@ public final Builder vertices(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String field; private Integer maxDocsPerValue; @@ -125,6 +125,11 @@ public final Builder maxDocsPerValue(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SampleDiversity}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Vertex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Vertex.java index 895f6f3e1..0517b9c5e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Vertex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/Vertex.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Long; @@ -131,7 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Vertex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long depth; private String field; @@ -172,6 +172,11 @@ public final Builder weight(double value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Vertex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexDefinition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexDefinition.java index 60ff8d129..5c1ba77e9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexDefinition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexDefinition.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -185,7 +185,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link VertexDefinition}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List exclude; @@ -284,6 +284,11 @@ public final Builder size(@Nullable Integer value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link VertexDefinition}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexInclude.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexInclude.java index c3b53ebd4..2ffc5faa0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexInclude.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/VertexInclude.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.String; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link VertexInclude}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Double boost; private String term; @@ -125,6 +125,11 @@ public final Builder term(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link VertexInclude}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleResponse.java index 024b135a2..c8161b49b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -101,7 +101,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExplainLifecycleResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map indices; /** @@ -134,6 +136,11 @@ public final Builder indices(String key, return indices(key, fn.apply(new LifecycleExplain.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExplainLifecycleResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusResponse.java index 1689151c4..bd8ada129 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/GetIlmStatusResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -90,7 +90,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetIlmStatusResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private LifecycleOperationMode operationMode; /** @@ -101,6 +103,11 @@ public final Builder operationMode(LifecycleOperationMode value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetIlmStatusResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/IlmPolicy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/IlmPolicy.java index 25ee7e8cb..3867527ae 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/IlmPolicy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/IlmPolicy.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -108,7 +108,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IlmPolicy}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Phases phases; @Nullable @@ -137,6 +137,11 @@ public final Builder name(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IlmPolicy}. * 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 6dc4ac29a..00f49a7e2 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 @@ -34,7 +34,7 @@ import co.elastic.clients.transport.Endpoint; import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -140,7 +140,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MigrateToDataTiersRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean dryRun; @@ -178,6 +180,11 @@ public final Builder nodeAttribute(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MigrateToDataTiersRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersResponse.java index 60222893c..38d3d2bfa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/MigrateToDataTiersResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -212,7 +212,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MigrateToDataTiersResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Boolean dryRun; private String removedLegacyTemplate; @@ -346,6 +348,11 @@ public final Builder migratedComponentTemplates(String value, String... values) return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MigrateToDataTiersResponse}. * 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 b22845822..e9b8c0689 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 @@ -36,7 +36,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Collections; @@ -131,7 +131,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link MoveToStepRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private StepKey currentStep; @@ -180,6 +180,11 @@ public final Builder nextStep(Function> return this.nextStep(fn.apply(new StepKey.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link MoveToStepRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phase.java index 3dca5ab5c..3b93f9485 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phase.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -112,7 +112,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Phase}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private JsonData actions; @@ -142,6 +142,11 @@ public final Builder minAge(Function> fn) { return this.minAge(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Phase}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phases.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phases.java index a7b3a7bb8..0dd31d670 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phases.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/Phases.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -144,7 +144,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Phases}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Phase cold; @@ -217,6 +217,11 @@ public final Builder warm(Function> fn) { return this.warm(fn.apply(new Phase.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Phases}. * 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 949d6cb79..f2a6e2eb3 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 @@ -36,7 +36,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -146,7 +146,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutLifecycleRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Time masterTimeout; @@ -225,6 +227,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutLifecycleRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyResponse.java index b76f96e66..ca211f4aa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/RemovePolicyResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -112,7 +112,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RemovePolicyResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List failedIndexes; private Boolean hasFailures; @@ -145,6 +147,11 @@ public final Builder hasFailures(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RemovePolicyResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplain.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplain.java index 79ee435d6..9e410c52c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplain.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplain.java @@ -32,9 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -156,10 +156,14 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Kind _kind; private LifecycleExplainVariant _value; + @Override + protected Builder self() { + return this; + } public ObjectBuilder true_(LifecycleExplainManaged v) { this._kind = Kind.True; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainManaged.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainManaged.java index c49950c5a..c6e629cbd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainManaged.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainManaged.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -344,7 +344,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LifecycleExplainManaged}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String action; private String actionTimeMillis; @@ -555,6 +557,11 @@ public final Builder timeSinceIndexCreation(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String policy; private Long version; @@ -151,6 +153,11 @@ public final Builder modifiedDateInMillis(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LifecycleExplainPhaseExecution}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainUnmanaged.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainUnmanaged.java index c72b9ddbb..e9b32ae0b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainUnmanaged.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/explain_lifecycle/LifecycleExplainUnmanaged.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -101,7 +101,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link LifecycleExplainUnmanaged}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; /** @@ -112,6 +114,11 @@ public final Builder index(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link LifecycleExplainUnmanaged}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/get_lifecycle/Lifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/get_lifecycle/Lifecycle.java index fe29526e2..4b3b74c3f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/get_lifecycle/Lifecycle.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/get_lifecycle/Lifecycle.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -118,7 +118,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Lifecycle}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String modifiedDate; private IlmPolicy policy; @@ -156,6 +156,11 @@ public final Builder version(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Lifecycle}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/move_to_step/StepKey.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/move_to_step/StepKey.java index 177629483..a65608057 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/move_to_step/StepKey.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/move_to_step/StepKey.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -116,7 +116,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link StepKey}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String action; private String name; @@ -147,6 +147,11 @@ public final Builder phase(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link StepKey}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/Alias.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/Alias.java index 075f713d8..af2a08dce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/Alias.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/Alias.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -181,7 +181,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Alias}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Query filter; @@ -255,6 +255,11 @@ public final Builder searchRouting(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Alias}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AliasDefinition.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AliasDefinition.java index 69ceb407f..f9670521c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AliasDefinition.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AliasDefinition.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -164,7 +164,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AliasDefinition}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Query filter; @@ -227,6 +227,11 @@ public final Builder searchRouting(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AliasDefinition}. * 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 bcb649b6f..8c190cf64 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -269,7 +269,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AnalyzeRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String analyzer; @@ -455,6 +455,11 @@ public final Builder tokenizer(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private AnalyzeDetail detail; @@ -168,6 +168,11 @@ public final Builder tokens(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map aliases; @@ -346,6 +346,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CloneIndexRequest}. * 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 afda94dac..df191c5bb 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -219,7 +219,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CreateIndexRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map aliases; @@ -394,6 +396,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CreateIndexRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexResponse.java index 5be4b2cbd..134256e94 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexResponse.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -122,7 +122,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CreateIndexResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String index; private Boolean shardsAcknowledged; @@ -154,6 +156,11 @@ public final Builder acknowledged(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CreateIndexResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java index 1e4924324..a38f499dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -94,7 +94,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DataStream}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Boolean hidden; @@ -106,6 +106,11 @@ public final Builder hidden(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DataStream}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsResponse.java index 235cef2fe..9978e211c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamsStatsResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -173,7 +173,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DataStreamsStatsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private ShardStatistics shards; private Integer backingIndices; @@ -264,6 +266,11 @@ public final Builder dataStreams( return dataStreams(fn.apply(new DataStreamsStatsItem.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DataStreamsStatsResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageResponse.java index b12d0bdff..6015cb578 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -84,7 +85,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link DiskUsageResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private JsonData valueBody; /** @@ -97,6 +98,19 @@ public final Builder valueBody(JsonData value) { return this; } + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + JsonData value = (JsonData) JsonData._DESERIALIZER.deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DiskUsageResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FielddataFrequencyFilter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FielddataFrequencyFilter.java index bc8c49822..10e784319 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FielddataFrequencyFilter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FielddataFrequencyFilter.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Double; import java.lang.Integer; @@ -117,7 +117,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link FielddataFrequencyFilter}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Double max; private Double min; @@ -148,6 +150,11 @@ public final Builder minSegmentSize(int value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FielddataFrequencyFilter}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamResponse.java index e46db9a06..192513c90 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetDataStreamResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List dataStreams; /** @@ -133,6 +135,11 @@ public final Builder dataStreams( return dataStreams(fn.apply(new IndicesGetDataStreamItem.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link GetDataStreamResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateResponse.java index 9a84b1843..3071088b7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexTemplateResponse.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link GetIndexTemplateResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List indexTemplates; /** @@ -132,6 +134,11 @@ public final Builder indexTemplates(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private List overlapping; @@ -184,6 +186,11 @@ public final Builder template(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private IndexRoutingAllocation allocation; @@ -149,6 +149,11 @@ public final Builder rebalance( return this.rebalance(fn.apply(new IndexRoutingRebalance.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRouting}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java index 9bc6c3959..f202acb91 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocation.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -144,7 +144,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRoutingAllocation}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private IndexRoutingAllocationOptions enable; @@ -213,6 +215,11 @@ public final Builder disk( return this.disk(fn.apply(new IndexRoutingAllocationDisk.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRoutingAllocation}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationDisk.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationDisk.java index 0b7cfa84d..dc7b57625 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationDisk.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationDisk.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -95,7 +95,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRoutingAllocationDisk}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean thresholdEnabled; @@ -107,6 +109,11 @@ public final Builder thresholdEnabled(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRoutingAllocationDisk}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInclude.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInclude.java index 6436adf03..4946de6bf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInclude.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInclude.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -112,7 +112,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRoutingAllocationInclude}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private String tierPreference; @@ -135,6 +137,11 @@ public final Builder id(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRoutingAllocationInclude}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInitialRecovery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInitialRecovery.java index be0b15921..3acddf85b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInitialRecovery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingAllocationInitialRecovery.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -96,7 +96,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRoutingAllocationInitialRecovery}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable @@ -110,6 +110,11 @@ public final Builder id(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRoutingAllocationInitialRecovery}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingRebalance.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingRebalance.java index 382a81fc7..d7395ddb5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingRebalance.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexRoutingRebalance.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -90,7 +90,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexRoutingRebalance}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private IndexRoutingRebalanceOptions enable; /** @@ -101,6 +103,11 @@ public final Builder enable(IndexRoutingRebalanceOptions value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexRoutingRebalance}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSegmentSort.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSegmentSort.java index f51df4455..bf1070132 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSegmentSort.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSegmentSort.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -156,7 +156,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexSegmentSort}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List field; private List order; @@ -247,6 +247,11 @@ public final Builder missing(SegmentSortMissing value, SegmentSortMissing... val return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexSegmentSort}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettingBlocks.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettingBlocks.java index 4c7120b20..0713b19c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettingBlocks.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettingBlocks.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -163,7 +163,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexSettingBlocks}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean readOnly; @@ -219,6 +221,11 @@ public final Builder metadata(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexSettingBlocks}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java index c2fbe1efe..5f1aa4821 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -1039,7 +1039,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexSettings}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private IndexSettings index; @@ -1761,6 +1761,11 @@ public final Builder settings(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map analyzer; @@ -351,6 +353,11 @@ public final Builder tokenizer(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; /** @@ -102,6 +104,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexSettingsLifecycle}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java index 7edc14ae0..9a6d1f567 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -172,7 +172,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexState}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map aliases; @@ -276,6 +276,11 @@ public final Builder dataStream(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexState}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexVersioning.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexVersioning.java index a9d6bf73f..6ce5f6a2a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexVersioning.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexVersioning.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -90,7 +90,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexVersioning}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String created; /** @@ -101,6 +101,11 @@ public final Builder created(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexVersioning}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsResponse.java index f7a42eecc..c6c59bb44 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -127,7 +127,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesStatsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map indices; @@ -194,6 +196,11 @@ public final Builder all(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private NumericFielddataFormat format; /** @@ -100,6 +100,11 @@ public final Builder format(NumericFielddataFormat value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link NumericFielddata}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OverlappingIndexTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OverlappingIndexTemplate.java index c8ce87b49..1dc531d95 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OverlappingIndexTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OverlappingIndexTemplate.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -113,7 +113,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link OverlappingIndexTemplate}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; @Nullable @@ -147,6 +149,11 @@ public final Builder indexPatterns(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link OverlappingIndexTemplate}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamResponse.java index 30fcc6774..9006017b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PromoteDataStreamResponse.java @@ -32,8 +32,9 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -85,7 +86,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PromoteDataStreamResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private JsonData valueBody; /** @@ -98,6 +101,19 @@ public final Builder valueBody(JsonData value) { return this; } + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + JsonData value = (JsonData) JsonData._DESERIALIZER.deserialize(parser, mapper); + return this.valueBody(value); + } + + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PromoteDataStreamResponse}. * 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 d519ebf78..ad1e6d694 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -229,7 +229,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutAliasRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Query filter; @@ -378,6 +378,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutAliasRequest}. * 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 f62ceba70..7509badb4 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -232,7 +232,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutIndexTemplateRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map meta; @@ -372,6 +374,11 @@ public final Builder version(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutIndexTemplateRequest}. * 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 6cff8a1a6..ea086d0cd 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 @@ -37,8 +37,9 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.Boolean; import java.lang.String; import java.util.HashMap; @@ -210,7 +211,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutIndicesSettingsRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean allowNoIndices; @@ -390,6 +393,19 @@ public final Builder settings(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private FieldNamesField fieldNames; @@ -929,6 +929,11 @@ public final Builder writeIndexOnly(@Nullable Boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutMappingRequest}. * 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 69485eb22..57154e2fc 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -302,7 +302,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link PutTemplateRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map aliases; @@ -541,6 +543,11 @@ public final Builder version(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link PutTemplateRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersResponse.java index 4320aa314..b48263223 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -113,7 +113,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReloadSearchAnalyzersResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List reloadDetails; private ShardStatistics shards; @@ -162,6 +164,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private List indices; private List aliases; @@ -236,6 +238,11 @@ public final Builder dataStreams( return dataStreams(fn.apply(new ResolveIndexDataStreamsItem.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResolveIndexResponse}. * 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 7954f8507..3260e95f7 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 @@ -40,7 +40,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -266,7 +266,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RolloverRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String alias; @Nullable @@ -479,6 +479,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RolloverRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsResponse.java index 660771b7e..76fa86e91 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -114,7 +114,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SegmentsResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map indices; private ShardStatistics shards; @@ -163,6 +163,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map indices; /** @@ -134,6 +136,11 @@ public final Builder indices(String key, return indices(key, fn.apply(new IndicesShardStores.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStoresResponse}. * 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 d634eb79c..67344dc6a 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -197,7 +197,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShrinkRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map aliases; @@ -346,6 +346,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShrinkRequest}. * 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 9799d18ef..d835786d9 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Integer; @@ -285,7 +285,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SimulateIndexTemplateRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map meta; @@ -477,6 +479,11 @@ public final Builder version(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SimulateIndexTemplateRequest}. * 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 ce6fb6a88..20d6fb0f3 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 @@ -37,8 +37,9 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.Boolean; import java.lang.String; import java.util.HashMap; @@ -143,7 +144,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SimulateTemplateRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean create; @@ -220,6 +223,19 @@ public final Builder template(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Template template; /** @@ -109,6 +111,11 @@ public final Builder template(Function return this.template(fn.apply(new Template.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SimulateTemplateResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SoftDeletes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SoftDeletes.java index 9482d160f..903f040cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SoftDeletes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SoftDeletes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.Objects; @@ -89,7 +89,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SoftDeletes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean enabled; /** @@ -100,6 +100,11 @@ public final Builder enabled(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SoftDeletes}. * 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 4a9313fbc..7e1dc1cdf 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.HashMap; @@ -198,7 +198,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link SplitRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Map aliases; @@ -347,6 +347,11 @@ public final Builder waitForActiveShards( return this.waitForActiveShards(fn.apply(new WaitForActiveShards.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link SplitRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/TemplateMapping.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/TemplateMapping.java index 4e17fc89a..297e45914 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/TemplateMapping.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/TemplateMapping.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.Long; @@ -189,7 +189,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TemplateMapping}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map aliases; private List indexPatterns; @@ -303,6 +303,11 @@ public final Builder version(@Nullable Long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TemplateMapping}. * 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 aaebf0525..dc1923001 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 @@ -37,7 +37,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.HashMap; import java.util.List; @@ -135,7 +135,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link UpdateAliasesRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private List actions; @@ -212,6 +214,11 @@ public final Builder timeout(Function> fn) { return this.timeout(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link UpdateAliasesRequest}. * 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 ac4b25336..e166a1df4 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 @@ -38,7 +38,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -308,7 +308,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ValidateQueryRequest}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Boolean allShards; @@ -564,6 +566,11 @@ public final Builder type(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ValidateQueryRequest}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryResponse.java index f14ddb394..2dc017c44 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryResponse.java @@ -33,7 +33,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -149,7 +149,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ValidateQueryResponse}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private List explanations; @@ -222,6 +224,11 @@ public final Builder error(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ValidateQueryResponse}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/add_block/IndicesBlockStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/add_block/IndicesBlockStatus.java index 810e5e2b7..c5b305d1c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/add_block/IndicesBlockStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/add_block/IndicesBlockStatus.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesBlockStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private Boolean blocked; @@ -126,6 +128,11 @@ public final Builder blocked(boolean value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesBlockStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzeDetail.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzeDetail.java index bb9e85aaa..8316e3488 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzeDetail.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzeDetail.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.util.List; @@ -167,7 +167,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AnalyzeDetail}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private AnalyzerDetail analyzer; @@ -278,6 +278,11 @@ public final Builder tokenizer(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long endOffset; private Long position; @@ -222,6 +222,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link AnalyzeToken}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzerDetail.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzerDetail.java index 835de751e..20b4476d4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzerDetail.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/AnalyzerDetail.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -113,7 +113,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link AnalyzerDetail}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private List tokens; @@ -155,6 +155,11 @@ public final Builder tokens(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List filteredText; private String name; @@ -145,6 +145,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CharFilterDetail}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/ExplainAnalyzeToken.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/ExplainAnalyzeToken.java index c102688b2..9424fbf6a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/ExplainAnalyzeToken.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/ExplainAnalyzeToken.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; @@ -201,7 +201,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ExplainAnalyzeToken}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String bytes; private Long endOffset; @@ -293,6 +295,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ExplainAnalyzeToken}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/TokenDetail.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/TokenDetail.java index 0c45272b2..e0cd2656e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/TokenDetail.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/analyze/TokenDetail.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -112,7 +112,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TokenDetail}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private List tokens; @@ -154,6 +154,11 @@ public final Builder tokens(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Boolean closed; @Nullable @@ -159,6 +159,11 @@ public final Builder shards(String key, return shards(key, fn.apply(new CloseShardResult.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link CloseIndexResult}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/close/CloseShardResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/close/CloseShardResult.java index 3dc003465..5bd2e5fd4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/close/CloseShardResult.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/close/CloseShardResult.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -100,7 +100,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link CloseShardResult}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List failures; /** @@ -132,6 +132,11 @@ public final Builder failures(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Integer backingIndices; private String dataStream; @@ -201,6 +203,11 @@ public final Builder maximumTimestamp(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link DataStreamsStatsItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_alias/IndexAliases.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_alias/IndexAliases.java index 4a7c074d2..b0cd2f8f9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_alias/IndexAliases.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_alias/IndexAliases.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Map; @@ -102,7 +102,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexAliases}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map aliases; /** @@ -134,6 +134,11 @@ public final Builder aliases(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private IndicesGetDataStreamItemTimestampField timestampField; @@ -383,6 +385,11 @@ public final Builder meta(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesGetDataStreamItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemIndex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemIndex.java index 5af76978c..297f266fa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemIndex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemIndex.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesGetDataStreamItemIndex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String indexName; private String indexUuid; @@ -125,6 +127,11 @@ public final Builder indexUuid(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesGetDataStreamItemIndex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemTimestampField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemTimestampField.java index cec048610..34656bbc1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemTimestampField.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_stream/IndicesGetDataStreamItemTimestampField.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -92,7 +92,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndicesGetDataStreamItemTimestampField}. */ - public static class Builder extends ObjectBuilderBase + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; @@ -105,6 +105,11 @@ public final Builder name(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesGetDataStreamItemTimestampField}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_field_mapping/TypeFieldMappings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_field_mapping/TypeFieldMappings.java index 0a0f5b911..561553d66 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_field_mapping/TypeFieldMappings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_field_mapping/TypeFieldMappings.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -91,7 +91,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link TypeFieldMappings}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private FieldMapping mappings; /** @@ -109,6 +109,11 @@ public final Builder mappings(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List indexPatterns; private List composedOf; @@ -376,6 +376,11 @@ public final Builder dataStream(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexTemplate}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_index_template/IndexTemplateItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_index_template/IndexTemplateItem.java index fac3bbbca..b9343963e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_index_template/IndexTemplateItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_index_template/IndexTemplateItem.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexTemplateItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private IndexTemplate indexTemplate; @@ -132,6 +132,11 @@ public final Builder indexTemplate(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map aliases; @@ -216,6 +218,11 @@ public final Builder settings(String key, JsonData value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexTemplateSummary}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_mapping/IndexMappingRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_mapping/IndexMappingRecord.java index c6244f2a5..d11fb6e1e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_mapping/IndexMappingRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_mapping/IndexMappingRecord.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.Objects; import java.util.function.Function; @@ -108,7 +108,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexMappingRecord}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private TypeMapping item; @@ -144,6 +146,11 @@ public final Builder mappings(Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Map aliases; @@ -207,6 +209,11 @@ public final Builder settings(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long length; private String name; @@ -148,6 +148,11 @@ public final Builder recovered(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link FileDetails}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryBytes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryBytes.java index 08961a2ff..0797c92d7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryBytes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryBytes.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -215,7 +215,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryBytes}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String percent; @Nullable @@ -311,6 +311,11 @@ public final Builder totalInBytes(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryBytes}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryFiles.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryFiles.java index 30ca7ee2c..77fe6a385 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryFiles.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryFiles.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -152,7 +152,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryFiles}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private List details; @@ -225,6 +225,11 @@ public final Builder total(long value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryFiles}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryIndexStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryIndexStatus.java index 9ef159078..075442a34 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryIndexStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryIndexStatus.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -215,7 +215,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryIndexStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private RecoveryBytes bytes; @@ -352,6 +354,11 @@ public final Builder totalTime(Function> fn) { return this.totalTime(fn.apply(new Time.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryIndexStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryOrigin.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryOrigin.java index e0593f330..32adb1f63 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryOrigin.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryOrigin.java @@ -30,7 +30,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -283,7 +283,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryOrigin}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private String hostname; @@ -416,6 +416,11 @@ public final Builder index(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryOrigin}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStartStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStartStatus.java index 5843d5c00..708768ec6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStartStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStartStatus.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -105,7 +105,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryStartStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Long checkIndexTime; private String totalTimeInMillis; @@ -126,6 +128,11 @@ public final Builder totalTimeInMillis(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RecoveryStartStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStatus.java index c8d249133..03a355120 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStatus.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStatus.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RecoveryStatus}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List shards; /** @@ -131,6 +131,11 @@ public final Builder shards(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Long id; private RecoveryIndexStatus index; @@ -511,6 +511,11 @@ public final Builder verifyIndex(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String percent; private Long recovered; @@ -223,6 +223,11 @@ public final Builder totalTimeInMillis(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link TranslogStatus}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/VerifyIndex.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/VerifyIndex.java index 57224c0db..be36f96dc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/VerifyIndex.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/VerifyIndex.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -139,7 +139,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link VerifyIndex}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable private Time checkIndexTime; @@ -196,6 +196,11 @@ public final Builder totalTimeInMillis(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link VerifyIndex}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/reload_search_analyzers/ReloadDetails.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/reload_search_analyzers/ReloadDetails.java index 4f721bad6..94be81047 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/reload_search_analyzers/ReloadDetails.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/reload_search_analyzers/ReloadDetails.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -134,7 +134,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ReloadDetails}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String index; private List reloadedAnalyzers; @@ -189,6 +189,11 @@ public final Builder reloadedNodeIds(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ReloadDetails}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexAliasItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexAliasItem.java index 1c3b00e4a..51b88f3df 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexAliasItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexAliasItem.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -113,7 +113,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ResolveIndexAliasItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private List indices; @@ -146,6 +148,11 @@ public final Builder indices(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResolveIndexAliasItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexDataStreamsItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexDataStreamsItem.java index 78885e868..77f06848e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexDataStreamsItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexDataStreamsItem.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -126,7 +126,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ResolveIndexDataStreamsItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String name; private String timestampField; @@ -169,6 +171,11 @@ public final Builder backingIndices(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResolveIndexDataStreamsItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexItem.java index 90b458fae..6c6fd7e00 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/resolve_index/ResolveIndexItem.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -150,7 +150,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ResolveIndexItem}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; @Nullable @@ -217,6 +217,11 @@ public final Builder dataStream(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ResolveIndexItem}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/rollover/RolloverConditions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/rollover/RolloverConditions.java index e3463e28b..15d9672bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/rollover/RolloverConditions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/rollover/RolloverConditions.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -148,7 +148,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link RolloverConditions}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { @Nullable private Time maxAge; @@ -200,6 +202,11 @@ public final Builder maxPrimaryShardSize(@Nullable String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link RolloverConditions}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/IndexSegment.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/IndexSegment.java index 98403ab4d..1a3b4797e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/IndexSegment.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/IndexSegment.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -109,7 +109,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link IndexSegment}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map> shards; /** @@ -132,6 +132,11 @@ public final Builder shards(String key, List value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndexSegment}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/Segment.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/Segment.java index 0d44d01d7..c1deb8a44 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/Segment.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/Segment.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Double; @@ -220,7 +220,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Segment}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Map attributes; private Boolean committed; @@ -333,6 +333,11 @@ public final Builder version(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Segment}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java index 6ff7f4be8..696cabe84 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; @@ -118,7 +118,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardSegmentRouting}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String node; private Boolean primary; @@ -149,6 +151,11 @@ public final Builder state(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardSegmentRouting}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardsSegment.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardsSegment.java index 31f5fd4ad..36bfdefda 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardsSegment.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardsSegment.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; @@ -142,7 +142,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardsSegment}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private Integer numCommittedSegments; private ShardSegmentRouting routing; @@ -211,6 +211,11 @@ public final Builder segments(String key, Function { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private Map shards; /** @@ -134,6 +136,11 @@ public final Builder shards(String key, return shards(key, fn.apply(new ShardStoreWrapper.Builder()).build()); } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link IndicesShardStores}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java index 3015d2b8a..c4a8966a3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java @@ -32,7 +32,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Long; import java.lang.String; @@ -192,7 +192,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStore}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private ShardStoreAllocation allocation; private String allocationId; @@ -293,6 +293,11 @@ public final Builder transportAddress(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStore}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreException.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreException.java index 05142e574..961ced71d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreException.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreException.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; @@ -104,7 +104,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStoreException}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { private String reason; private String type; @@ -125,6 +127,11 @@ public final Builder type(String value) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link ShardStoreException}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreWrapper.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreWrapper.java index 5438c635a..7b9917f92 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreWrapper.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreWrapper.java @@ -31,7 +31,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.util.List; import java.util.Objects; @@ -99,7 +99,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link ShardStoreWrapper}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List stores; /** @@ -131,6 +131,11 @@ public final Builder stores(Function { + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private String name; private List indexPatterns; @@ -146,6 +146,11 @@ public final Builder indexPatterns(String value, String... values) { return this; } + @Override + protected Builder self() { + return this; + } + /** * Builds a {@link Overlapping}. * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/simulate_template/Template.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/simulate_template/Template.java index 7a2a4cce3..cfec83d94 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/simulate_template/Template.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/simulate_template/Template.java @@ -34,7 +34,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; -import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.List; @@ -159,7 +159,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { * Builder for {@link Template}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder