From 0186134ec96fc14308219d7a7cf9a2d6478a55e7 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Wed, 28 Aug 2024 17:20:35 +0200 Subject: [PATCH] [codegen] update serverless to latest spec --- .../ElasticsearchAsyncClient.java | 182 ++- .../elasticsearch/ElasticsearchClient.java | 182 ++- .../elasticsearch/_types/KnnQuery.java | 33 + .../clients/elasticsearch/_types/RrfRank.java | 26 +- .../_types/analysis/Analyzer.java | 1397 +++++++++++++++-- .../_types/analysis/AnalyzerBuilders.java | 644 ++++++++ .../_types/analysis/ArabicAnalyzer.java | 262 ++++ .../_types/analysis/ArmenianAnalyzer.java | 262 ++++ .../_types/analysis/BasqueAnalyzer.java | 262 ++++ .../_types/analysis/BengaliAnalyzer.java | 262 ++++ .../_types/analysis/BrazilianAnalyzer.java | 217 +++ .../_types/analysis/BulgarianAnalyzer.java | 262 ++++ .../_types/analysis/CatalanAnalyzer.java | 262 ++++ .../_types/analysis/ChineseAnalyzer.java | 217 +++ .../_types/analysis/CjkAnalyzer.java | 216 +++ .../_types/analysis/CzechAnalyzer.java | 262 ++++ .../_types/analysis/DanishAnalyzer.java | 217 +++ .../_types/analysis/DutchAnalyzer.java | 74 + .../_types/analysis/EnglishAnalyzer.java | 262 ++++ .../_types/analysis/EstonianAnalyzer.java | 217 +++ .../_types/analysis/FinnishAnalyzer.java | 262 ++++ .../_types/analysis/FrenchAnalyzer.java | 262 ++++ .../_types/analysis/GalicianAnalyzer.java | 262 ++++ .../_types/analysis/GermanAnalyzer.java | 262 ++++ .../_types/analysis/GreekAnalyzer.java | 217 +++ .../_types/analysis/HindiAnalyzer.java | 262 ++++ .../_types/analysis/HungarianAnalyzer.java | 262 ++++ .../_types/analysis/IndonesianAnalyzer.java | 264 ++++ .../_types/analysis/IrishAnalyzer.java | 262 ++++ .../_types/analysis/ItalianAnalyzer.java | 262 ++++ .../_types/analysis/LatvianAnalyzer.java | 262 ++++ .../_types/analysis/LithuanianAnalyzer.java | 264 ++++ .../_types/analysis/NorwegianAnalyzer.java | 262 ++++ .../_types/analysis/PersianAnalyzer.java | 217 +++ .../_types/analysis/PhoneticTokenFilter.java | 43 +- .../_types/analysis/PortugueseAnalyzer.java | 264 ++++ .../_types/analysis/RomanianAnalyzer.java | 262 ++++ .../_types/analysis/RussianAnalyzer.java | 262 ++++ .../_types/analysis/SerbianAnalyzer.java | 262 ++++ .../_types/analysis/SoraniAnalyzer.java | 262 ++++ .../_types/analysis/SpanishAnalyzer.java | 262 ++++ .../_types/analysis/SwedishAnalyzer.java | 262 ++++ .../_types/analysis/ThaiAnalyzer.java | 216 +++ .../_types/analysis/TurkishAnalyzer.java | 262 ++++ .../mapping/DenseVectorIndexOptions.java | 73 +- .../_types/query_dsl/DateRangeQuery.java | 27 + .../_types/query_dsl/FunctionScoreQuery.java | 2 + .../_types/query_dsl/FuzzyQuery.java | 2 +- .../_types/query_dsl/MatchQuery.java | 2 +- .../_types/query_dsl/NumberRangeQuery.java | 36 + .../_types/query_dsl/RangeQueryBase.java | 28 - .../_types/query_dsl/TermQuery.java | 2 +- .../_types/query_dsl/TermRangeQuery.java | 35 + .../_types/query_dsl/UntypedRangeQuery.java | 27 + .../elasticsearch/cat/AliasesRequest.java | 11 +- .../cat/ComponentTemplatesRequest.java | 13 +- .../elasticsearch/cat/CountRequest.java | 12 +- .../cat/ElasticsearchCatAsyncClient.java | 395 ++--- .../cat/ElasticsearchCatClient.java | 395 ++--- .../elasticsearch/cat/HelpRequest.java | 2 +- .../elasticsearch/cat/IndicesRequest.java | 32 +- .../cat/MlDataFrameAnalyticsRequest.java | 10 +- .../elasticsearch/cat/MlDatafeedsRequest.java | 16 +- .../elasticsearch/cat/MlJobsRequest.java | 16 +- .../cat/MlTrainedModelsRequest.java | 9 +- .../elasticsearch/cat/TransformsRequest.java | 8 +- .../cluster/ClusterInfoRequest.java | 2 +- .../DeleteComponentTemplateRequest.java | 6 +- .../ElasticsearchClusterAsyncClient.java | 40 +- .../cluster/ElasticsearchClusterClient.java | 40 +- .../ExistsComponentTemplateRequest.java | 3 +- .../cluster/GetComponentTemplateRequest.java | 2 +- .../cluster/PutComponentTemplateRequest.java | 28 +- .../connector/CheckInRequest.java | 181 +++ .../connector/CheckInResponse.java | 153 ++ .../elasticsearch/connector/Connector.java | 1089 +++++++++++++ .../connector/ConnectorConfigProperties.java | 666 ++++++++ .../connector/ConnectorFeatures.java | 274 ++++ .../connector/ConnectorFieldType.java | 71 + .../connector/ConnectorScheduling.java | 185 +++ .../connector/ConnectorStatus.java | 73 + .../connector/ConnectorSyncJob.java | 634 ++++++++ .../connector/CustomScheduling.java | 266 ++++ ...ustomSchedulingConfigurationOverrides.java | 333 ++++ .../connector/DeleteConnectorRequest.java | 214 +++ .../connector/DeleteConnectorResponse.java | 108 ++ .../elasticsearch/connector/Dependency.java | 217 +++ .../elasticsearch/connector/DisplayType.java | 72 + .../ElasticsearchConnectorAsyncClient.java | 915 +++++++++++ .../ElasticsearchConnectorClient.java | 942 +++++++++++ .../connector/FeatureEnabled.java | 152 ++ .../connector/FilteringAdvancedSnippet.java | 237 +++ .../connector/FilteringConfig.java | 221 +++ .../connector/FilteringPolicy.java | 67 + .../connector/FilteringRule.java | 329 ++++ .../connector/FilteringRuleRule.java | 77 + .../connector/FilteringRules.java | 245 +++ .../connector/FilteringRulesValidation.java | 209 +++ .../connector/FilteringValidation.java | 221 +++ .../connector/FilteringValidationState.java | 69 + .../connector/GetConnectorRequest.java | 181 +++ .../connector/GetConnectorResponse.java | 106 ++ .../connector/GreaterThanValidation.java | 166 ++ .../connector/IncludedInValidation.java | 197 +++ .../connector/IngestPipelineParams.java | 230 +++ .../connector/LessThanValidation.java | 166 ++ .../elasticsearch/connector/ListRequest.java | 362 +++++ .../elasticsearch/connector/ListResponse.java | 207 +++ .../connector/ListTypeValidation.java | 167 ++ .../elasticsearch/connector/PostRequest.java | 333 ++++ .../elasticsearch/connector/PostResponse.java | 177 +++ .../elasticsearch/connector/PutRequest.java | 396 +++++ .../elasticsearch/connector/PutResponse.java | 177 +++ .../connector/RegexValidation.java | 165 ++ .../connector/SchedulingConfiguration.java | 241 +++ .../elasticsearch/connector/SelectOption.java | 217 +++ .../connector/SyncJobCancelRequest.java | 184 +++ .../connector/SyncJobCancelResponse.java | 156 ++ .../connector/SyncJobConnectorReference.java | 388 +++++ .../connector/SyncJobDeleteRequest.java | 183 +++ .../connector/SyncJobDeleteResponse.java | 108 ++ .../connector/SyncJobGetRequest.java | 182 +++ .../connector/SyncJobGetResponse.java | 106 ++ .../connector/SyncJobListRequest.java | 301 ++++ .../connector/SyncJobListResponse.java | 210 +++ .../connector/SyncJobPostRequest.java | 245 +++ .../connector/SyncJobPostResponse.java | 156 ++ .../connector/SyncJobTriggerMethod.java | 67 + .../elasticsearch/connector/SyncJobType.java | 68 + .../connector/SyncRulesFeature.java | 201 +++ .../elasticsearch/connector/SyncStatus.java | 76 + .../UpdateActiveFilteringRequest.java | 184 +++ .../UpdateActiveFilteringResponse.java | 157 ++ .../connector/UpdateApiKeyIdRequest.java | 270 ++++ .../connector/UpdateApiKeyIdResponse.java | 157 ++ .../connector/UpdateConfigurationRequest.java | 315 ++++ .../UpdateConfigurationResponse.java | 157 ++ .../connector/UpdateErrorRequest.java | 259 +++ .../connector/UpdateErrorResponse.java | 155 ++ .../connector/UpdateFilteringRequest.java | 357 +++++ .../connector/UpdateFilteringResponse.java | 157 ++ .../UpdateFilteringValidationRequest.java | 246 +++ .../UpdateFilteringValidationResponse.java | 158 ++ .../connector/UpdateIndexNameRequest.java | 261 +++ .../connector/UpdateIndexNameResponse.java | 157 ++ .../connector/UpdateNameRequest.java | 269 ++++ .../connector/UpdateNameResponse.java | 155 ++ .../connector/UpdateNativeRequest.java | 235 +++ .../connector/UpdateNativeResponse.java | 156 ++ .../connector/UpdatePipelineRequest.java | 242 +++ .../connector/UpdatePipelineResponse.java | 157 ++ .../connector/UpdateSchedulingRequest.java | 244 +++ .../connector/UpdateSchedulingResponse.java | 157 ++ .../connector/UpdateServiceTypeRequest.java | 236 +++ .../connector/UpdateServiceTypeResponse.java | 157 ++ .../connector/UpdateStatusRequest.java | 234 +++ .../connector/UpdateStatusResponse.java | 156 ++ .../elasticsearch/connector/Validation.java | 308 ++++ .../connector/ValidationBuilders.java | 139 ++ .../connector/ValidationVariant.java | 50 + .../elasticsearch/core/BulkRequest.java | 5 +- .../elasticsearch/core/CreateRequest.java | 6 +- .../core/DeleteByQueryRequest.java | 2 +- .../elasticsearch/core/DeleteRequest.java | 2 +- .../core/DeleteScriptRequest.java | 3 +- .../elasticsearch/core/ExistsRequest.java | 2 +- .../core/ExistsSourceRequest.java | 3 +- .../elasticsearch/core/ExplainRequest.java | 4 +- .../elasticsearch/core/GetRequest.java | 3 +- .../elasticsearch/core/GetScriptRequest.java | 3 +- .../elasticsearch/core/GetSourceRequest.java | 2 +- .../elasticsearch/core/IndexRequest.java | 6 +- .../elasticsearch/core/InfoRequest.java | 2 +- .../elasticsearch/core/MsearchRequest.java | 18 +- .../elasticsearch/core/PingRequest.java | 2 +- .../elasticsearch/core/PutScriptRequest.java | 3 +- .../elasticsearch/core/ReindexRequest.java | 7 +- .../core/ScriptsPainlessExecuteRequest.java | 2 +- .../elasticsearch/core/SearchMvtRequest.java | 3 +- .../core/TermvectorsRequest.java | 4 +- .../core/TermvectorsResponse.java | 17 +- .../core/UpdateByQueryRequest.java | 37 +- .../elasticsearch/core/UpdateRequest.java | 3 +- .../elasticsearch/core/get/GetResult.java | 46 + .../mtermvectors/MultiTermVectorsResult.java | 17 +- .../core/rank_eval/RankEvalQuery.java | 2 + .../PainlessContextSetup.java | 20 +- .../core/search/CompletionContext.java | 2 +- .../core/search/HighlightField.java | 37 - .../elasticsearch/core/search/Hit.java | 30 + .../core/termvectors/TermVector.java | 19 +- .../elasticsearch/doc-files/api-spec.html | 437 ++++-- .../enrich/DeletePolicyRequest.java | 3 +- .../ElasticsearchEnrichAsyncClient.java | 20 +- .../enrich/ElasticsearchEnrichClient.java | 20 +- .../enrich/EnrichStatsRequest.java | 4 +- .../enrich/GetPolicyRequest.java | 2 +- .../enrich/PutPolicyRequest.java | 2 +- .../elasticsearch/esql/QueryRequest.java | 74 + .../elasticsearch/esql/TableValues.java | 343 ++++ .../esql/TableValuesBuilders.java | 57 + .../esql/TableValuesVariant.java | 48 + .../indices/AddBlockRequest.java | 3 +- .../indices/CreateDataStreamRequest.java | 93 +- .../indices/CreateIndexRequest.java | 2 +- .../elasticsearch/indices/DataStream.java | 83 +- .../indices/DataStreamIndex.java | 45 +- .../indices/DataStreamLifecycle.java | 4 +- .../DataStreamLifecycleWithRollover.java | 2 +- .../indices/DataStreamsStatsRequest.java | 2 +- .../indices/DeleteAliasRequest.java | 2 +- .../indices/DeleteDataLifecycleRequest.java | 4 +- .../indices/DeleteDataStreamRequest.java | 46 +- .../indices/DeleteIndexRequest.java | 2 +- .../ElasticsearchIndicesAsyncClient.java | 242 +-- .../indices/ElasticsearchIndicesClient.java | 242 +-- .../indices/ExistsAliasRequest.java | 2 +- .../elasticsearch/indices/ExistsRequest.java | 3 +- .../indices/ExplainDataLifecycleRequest.java | 6 +- .../elasticsearch/indices/FailureStore.java | 230 +++ .../indices/GetAliasRequest.java | 3 +- .../indices/GetDataLifecycleRequest.java | 47 +- .../indices/GetDataStreamRequest.java | 45 +- .../indices/GetIndexRequest.java | 4 +- .../indices/GetIndicesSettingsRequest.java | 4 +- .../indices/GetMappingRequest.java | 5 +- .../elasticsearch/indices/IndexState.java | 6 +- .../indices/MigrateToDataStreamRequest.java | 107 +- .../indices/ModifyDataStreamRequest.java | 4 +- .../indices/PutAliasRequest.java | 2 +- .../indices/PutDataLifecycleRequest.java | 3 +- .../indices/PutIndicesSettingsRequest.java | 4 +- .../indices/PutMappingRequest.java | 7 +- .../elasticsearch/indices/RefreshRequest.java | 6 +- .../indices/RolloverRequest.java | 3 +- .../indices/UpdateAliasesRequest.java | 2 +- .../indices/ValidateQueryRequest.java | 2 +- .../ElasticsearchLicenseAsyncClient.java | 27 +- .../license/ElasticsearchLicenseClient.java | 27 +- .../license/GetLicenseRequest.java | 9 +- .../ml/DeleteCalendarEventRequest.java | 2 +- .../ml/DeleteCalendarJobRequest.java | 2 +- .../ml/DeleteCalendarRequest.java | 3 +- .../ml/DeleteDataFrameAnalyticsRequest.java | 2 +- .../ml/DeleteDatafeedRequest.java | 2 +- .../elasticsearch/ml/DeleteFilterRequest.java | 2 +- .../ml/DeleteTrainedModelAliasRequest.java | 2 +- .../ml/DeleteTrainedModelRequest.java | 4 +- .../ml/ElasticsearchMlAsyncClient.java | 478 +++--- .../ml/ElasticsearchMlClient.java | 478 +++--- .../ml/EstimateModelMemoryRequest.java | 6 +- .../ml/EvaluateDataFrameRequest.java | 10 +- .../elasticsearch/ml/FlushJobRequest.java | 16 +- .../ml/GetCalendarEventsRequest.java | 2 +- .../elasticsearch/ml/GetCalendarsRequest.java | 2 +- .../ml/GetDataFrameAnalyticsRequest.java | 7 +- .../ml/GetDataFrameAnalyticsStatsRequest.java | 2 +- .../ml/GetDatafeedStatsRequest.java | 8 +- .../elasticsearch/ml/GetDatafeedsRequest.java | 8 +- .../elasticsearch/ml/GetFiltersRequest.java | 2 +- .../elasticsearch/ml/GetJobStatsRequest.java | 2 +- .../elasticsearch/ml/GetJobsRequest.java | 12 +- .../ml/GetOverallBucketsRequest.java | 6 +- .../ml/GetTrainedModelsRequest.java | 2 +- .../ml/GetTrainedModelsStatsRequest.java | 6 +- .../ml/InferTrainedModelRequest.java | 2 +- .../ml/InferenceResponseResult.java | 41 +- .../elasticsearch/ml/OpenJobRequest.java | 12 +- .../ml/PostCalendarEventsRequest.java | 2 +- .../ml/PreviewDataFrameAnalyticsRequest.java | 3 +- .../ml/PreviewDatafeedRequest.java | 2 +- .../ml/PutCalendarJobRequest.java | 2 +- .../elasticsearch/ml/PutCalendarRequest.java | 2 +- .../ml/PutDataFrameAnalyticsRequest.java | 6 +- .../elasticsearch/ml/PutDatafeedRequest.java | 10 +- .../elasticsearch/ml/PutFilterRequest.java | 6 +- .../ml/PutTrainedModelAliasRequest.java | 2 +- .../PutTrainedModelDefinitionPartRequest.java | 2 +- .../ml/PutTrainedModelRequest.java | 4 +- .../ml/PutTrainedModelVocabularyRequest.java | 2 +- .../elasticsearch/ml/ResetJobRequest.java | 2 +- .../ml/StartDataFrameAnalyticsRequest.java | 2 +- .../ml/StartDatafeedRequest.java | 2 +- .../StartTrainedModelDeploymentRequest.java | 2 +- .../ml/StopDataFrameAnalyticsRequest.java | 4 +- .../elasticsearch/ml/StopDatafeedRequest.java | 4 +- .../ml/StopTrainedModelDeploymentRequest.java | 2 +- .../ml/TrainedModelDeploymentStats.java | 47 +- .../ml/TrainedModelInferenceStats.java | 15 +- .../ml/TrainedModelSizeStats.java | 11 +- .../ml/UpdateDataFrameAnalyticsRequest.java | 2 +- .../ml/UpdateDatafeedRequest.java | 10 +- .../elasticsearch/ml/UpdateFilterRequest.java | 4 +- .../elasticsearch/ml/UpdateJobRequest.java | 3 +- .../UpdateTrainedModelDeploymentRequest.java | 3 +- .../query_rules/QueryRuleType.java | 2 + .../security/AuthenticateRequest.java | 14 +- .../security/CreateApiKeyRequest.java | 11 +- .../ElasticsearchSecurityAsyncClient.java | 198 +-- .../security/ElasticsearchSecurityClient.java | 198 +-- .../security/GetApiKeyRequest.java | 12 +- .../security/HasPrivilegesRequest.java | 3 +- .../security/InvalidateApiKeyRequest.java | 10 +- .../security/QueryApiKeysRequest.java | 4 +- .../security/UpdateApiKeyRequest.java | 32 +- .../tasks/ElasticsearchTasksAsyncClient.java | 6 +- .../tasks/ElasticsearchTasksClient.java | 6 +- .../elasticsearch/tasks/GetTasksRequest.java | 3 +- .../transform/DeleteTransformRequest.java | 2 +- .../ElasticsearchTransformAsyncClient.java | 60 +- .../ElasticsearchTransformClient.java | 60 +- .../transform/GetTransformRequest.java | 2 +- .../transform/GetTransformStatsRequest.java | 2 +- .../transform/PreviewTransformRequest.java | 3 +- .../transform/PutTransformRequest.java | 2 +- .../transform/ResetTransformRequest.java | 6 +- .../ScheduleNowTransformRequest.java | 3 +- .../transform/StartTransformRequest.java | 2 +- .../transform/StopTransformRequest.java | 2 +- .../transform/UpdateTransformRequest.java | 2 +- 320 files changed, 35344 insertions(+), 2385 deletions(-) create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EnglishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValues.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java create mode 100644 java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index 37cfcd5e1..d17c58377 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java @@ -24,6 +24,7 @@ import co.elastic.clients.elasticsearch.async_search.ElasticsearchAsyncSearchAsyncClient; import co.elastic.clients.elasticsearch.cat.ElasticsearchCatAsyncClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterAsyncClient; +import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorAsyncClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -170,6 +171,10 @@ public ElasticsearchClusterAsyncClient cluster() { return new ElasticsearchClusterAsyncClient(this.transport, this.transportOptions); } + public ElasticsearchConnectorAsyncClient connector() { + return new ElasticsearchConnectorAsyncClient(this.transport, this.transportOptions); + } + public ElasticsearchEnrichAsyncClient enrich() { return new ElasticsearchEnrichAsyncClient(this.transport, this.transportOptions); } @@ -241,8 +246,9 @@ public ElasticsearchTransformAsyncClient transform() { // ----- Endpoint: bulk /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see Documentation @@ -257,8 +263,9 @@ public CompletableFuture bulk(BulkRequest request) { } /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @param fn * a function that initializes a builder to create the @@ -273,8 +280,9 @@ public final CompletableFuture bulk(FunctionDocumentation @@ -414,9 +422,9 @@ public CompletableFuture count() { // ----- Endpoint: create /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -431,9 +439,9 @@ public CompletableFuture create(CreateRequest CompletableFuture create( // ----- Endpoint: delete /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see Documentation @@ -466,7 +474,7 @@ public CompletableFuture delete(DeleteRequest request) { } /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @param fn * a function that initializes a builder to create the @@ -484,7 +492,7 @@ public final CompletableFuture delete( // ----- Endpoint: delete_by_query /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @see Documentation @@ -499,7 +507,7 @@ public CompletableFuture deleteByQuery(DeleteByQueryReque } /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @param fn * a function that initializes a builder to create the @@ -517,7 +525,8 @@ public final CompletableFuture deleteByQuery( // ----- Endpoint: delete_script /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see Documentation @@ -532,7 +541,8 @@ public CompletableFuture deleteScript(DeleteScriptRequest } /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -550,7 +560,7 @@ public final CompletableFuture deleteScript( // ----- Endpoint: exists /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see Documentation @@ -565,7 +575,7 @@ public CompletableFuture exists(ExistsRequest request) { } /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @param fn * a function that initializes a builder to create the @@ -583,7 +593,8 @@ public final CompletableFuture exists( // ----- Endpoint: exists_source /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see Documentation @@ -598,7 +609,8 @@ public CompletableFuture existsSource(ExistsSourceRequest reque } /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @param fn * a function that initializes a builder to create the @@ -616,8 +628,8 @@ public final CompletableFuture existsSource( // ----- Endpoint: explain /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -635,8 +647,8 @@ public CompletableFuture> explain(Explain } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -652,8 +664,8 @@ public final CompletableFuture> explain( } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -671,8 +683,8 @@ public CompletableFuture> explain(Explain } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -748,7 +760,8 @@ public CompletableFuture fieldCaps() { // ----- Endpoint: get /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -766,7 +779,8 @@ public CompletableFuture> get(GetRequest requ } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -782,7 +796,8 @@ public final CompletableFuture> get( } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -799,7 +814,8 @@ public CompletableFuture> get(GetRequest requ } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -817,7 +833,8 @@ public final CompletableFuture> get( // ----- Endpoint: get_script /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @see Documentation @@ -832,7 +849,8 @@ public CompletableFuture getScript(GetScriptRequest request) } /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -850,7 +868,7 @@ public final CompletableFuture getScript( // ----- Endpoint: get_source /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -869,7 +887,7 @@ public CompletableFuture> getSource(Get } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -885,7 +903,7 @@ public final CompletableFuture> getSour } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -904,7 +922,7 @@ public CompletableFuture> getSource(Get } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -922,9 +940,9 @@ public final CompletableFuture> getSour // ----- Endpoint: index /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -939,9 +957,9 @@ public CompletableFuture index(IndexRequest CompletableFuture index( // ----- Endpoint: info /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -1277,7 +1295,7 @@ public final CompletableFuture openPointInTime( // ----- Endpoint: ping /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see Documentation @@ -1290,7 +1308,8 @@ public CompletableFuture ping() { // ----- Endpoint: put_script /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see Documentation @@ -1305,7 +1324,8 @@ public CompletableFuture putScript(PutScriptRequest request) } /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @param fn * a function that initializes a builder to create the @@ -1358,9 +1378,10 @@ public final CompletableFuture rankEval( // ----- Endpoint: reindex /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @see Documentation @@ -1375,9 +1396,10 @@ public CompletableFuture reindex(ReindexRequest request) { } /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @param fn * a function that initializes a builder to create the @@ -1441,7 +1463,7 @@ public CompletableFuture renderSearchTemplate() { // ----- Endpoint: scripts_painless_execute /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1460,7 +1482,7 @@ public CompletableFuture> scri } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1477,7 +1499,7 @@ public final CompletableFuture } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1496,7 +1518,7 @@ public CompletableFuture> scri } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1661,8 +1683,7 @@ public final CompletableFuture> search( // ----- Endpoint: search_mvt /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see Documentation @@ -1677,8 +1698,7 @@ public CompletableFuture searchMvt(SearchMvtRequest request) { } /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -1806,8 +1826,8 @@ public final CompletableFuture termsEnum( // ----- Endpoint: termvectors /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @see Documentation @@ -1822,8 +1842,8 @@ public CompletableFuture termvectors(Termvector } /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @param fn * a function that initializes a builder to create the @@ -1841,7 +1861,8 @@ public final CompletableFuture termvectors( // ----- Endpoint: update /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1859,7 +1880,8 @@ public CompletableFuture } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1876,7 +1898,8 @@ public final CompletableFutureDocumentation @@ -1894,7 +1917,8 @@ public CompletableFuture } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1913,9 +1937,10 @@ public final CompletableFutureDocumentation @@ -1930,9 +1955,10 @@ public CompletableFuture updateByQuery(UpdateByQueryReque } /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java index 07696bde9..63ece3e8c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java @@ -25,6 +25,7 @@ import co.elastic.clients.elasticsearch.async_search.ElasticsearchAsyncSearchClient; import co.elastic.clients.elasticsearch.cat.ElasticsearchCatClient; import co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient; +import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; @@ -171,6 +172,10 @@ public ElasticsearchClusterClient cluster() { return new ElasticsearchClusterClient(this.transport, this.transportOptions); } + public ElasticsearchConnectorClient connector() { + return new ElasticsearchConnectorClient(this.transport, this.transportOptions); + } + public ElasticsearchEnrichClient enrich() { return new ElasticsearchEnrichClient(this.transport, this.transportOptions); } @@ -242,8 +247,9 @@ public ElasticsearchTransformClient transform() { // ----- Endpoint: bulk /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see Documentation @@ -258,8 +264,9 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE } /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @param fn * a function that initializes a builder to create the @@ -275,8 +282,9 @@ public final BulkResponse bulk(FunctionDocumentation @@ -419,9 +427,9 @@ public CountResponse count() throws IOException, ElasticsearchException { // ----- Endpoint: create /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -437,9 +445,9 @@ public CreateResponse create(CreateRequest request) } /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @param fn * a function that initializes a builder to create the @@ -458,7 +466,7 @@ public final CreateResponse create( // ----- Endpoint: delete /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see Documentation @@ -473,7 +481,7 @@ public DeleteResponse delete(DeleteRequest request) throws IOException, Elastics } /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @param fn * a function that initializes a builder to create the @@ -491,7 +499,7 @@ public final DeleteResponse delete(FunctionDocumentation @@ -507,7 +515,7 @@ public DeleteByQueryResponse deleteByQuery(DeleteByQueryRequest request) } /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @param fn * a function that initializes a builder to create the @@ -526,7 +534,8 @@ public final DeleteByQueryResponse deleteByQuery( // ----- Endpoint: delete_script /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see Documentation @@ -541,7 +550,8 @@ public DeleteScriptResponse deleteScript(DeleteScriptRequest request) throws IOE } /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -560,7 +570,7 @@ public final DeleteScriptResponse deleteScript( // ----- Endpoint: exists /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see Documentation @@ -575,7 +585,7 @@ public BooleanResponse exists(ExistsRequest request) throws IOException, Elastic } /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @param fn * a function that initializes a builder to create the @@ -593,7 +603,8 @@ public final BooleanResponse exists(Function_source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see Documentation @@ -608,7 +619,8 @@ public BooleanResponse existsSource(ExistsSourceRequest request) throws IOExcept } /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @param fn * a function that initializes a builder to create the @@ -627,8 +639,8 @@ public final BooleanResponse existsSource( // ----- Endpoint: explain /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -646,8 +658,8 @@ public ExplainResponse explain(ExplainRequest request, Cl } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -664,8 +676,8 @@ public final ExplainResponse explain( } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see Documentation @@ -683,8 +695,8 @@ public ExplainResponse explain(ExplainRequest request, Ty } /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @param fn * a function that initializes a builder to create the @@ -761,7 +773,8 @@ public FieldCapsResponse fieldCaps() throws IOException, ElasticsearchException // ----- Endpoint: get /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see Documentation @@ -779,7 +792,8 @@ public GetResponse get(GetRequest request, Class GetResponse get(FunctionDocumentation @@ -813,7 +828,8 @@ public GetResponse get(GetRequest request, Type tDocument } /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @param fn * a function that initializes a builder to create the @@ -831,7 +847,8 @@ public final GetResponse get(FunctionDocumentation @@ -846,7 +863,8 @@ public GetScriptResponse getScript(GetScriptRequest request) throws IOException, } /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @param fn * a function that initializes a builder to create the @@ -864,7 +882,7 @@ public final GetScriptResponse getScript(FunctionDocumentation @@ -883,7 +901,7 @@ public GetSourceResponse getSource(GetSourceRequest reque } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -900,7 +918,7 @@ public final GetSourceResponse getSource( } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see Documentation @@ -919,7 +937,7 @@ public GetSourceResponse getSource(GetSourceRequest reque } /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @param fn * a function that initializes a builder to create the @@ -938,9 +956,9 @@ public final GetSourceResponse getSource( // ----- Endpoint: index /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see Documentation @@ -955,9 +973,9 @@ public IndexResponse index(IndexRequest request) throws I } /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @param fn * a function that initializes a builder to create the @@ -976,7 +994,7 @@ public final IndexResponse index( // ----- Endpoint: info /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -1301,7 +1319,7 @@ public final OpenPointInTimeResponse openPointInTime( // ----- Endpoint: ping /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see Documentation @@ -1314,7 +1332,8 @@ public BooleanResponse ping() throws IOException, ElasticsearchException { // ----- Endpoint: put_script /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see Documentation @@ -1329,7 +1348,8 @@ public PutScriptResponse putScript(PutScriptRequest request) throws IOException, } /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @param fn * a function that initializes a builder to create the @@ -1382,9 +1402,10 @@ public final RankEvalResponse rankEval(FunctionDocumentation @@ -1399,9 +1420,10 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast } /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @param fn * a function that initializes a builder to create the @@ -1467,7 +1489,7 @@ public RenderSearchTemplateResponse renderSearchTemplate() throws IOException, E // ----- Endpoint: scripts_painless_execute /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1487,7 +1509,7 @@ public ScriptsPainlessExecuteResponse scriptsPainlessExecute( } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1504,7 +1526,7 @@ public final ScriptsPainlessExecuteResponse scriptsPainlessEx } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see Documentation @@ -1523,7 +1545,7 @@ public ScriptsPainlessExecuteResponse scriptsPainlessExecute( } /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @param fn * a function that initializes a builder to create the @@ -1694,8 +1716,7 @@ public final SearchResponse search( // ----- Endpoint: search_mvt /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see Documentation @@ -1710,8 +1731,7 @@ public BinaryResponse searchMvt(SearchMvtRequest request) throws IOException, El } /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -1840,8 +1860,8 @@ public final TermsEnumResponse termsEnum(FunctionDocumentation @@ -1857,8 +1877,8 @@ public TermvectorsResponse termvectors(TermvectorsRequest } /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @param fn * a function that initializes a builder to create the @@ -1877,7 +1897,8 @@ public final TermvectorsResponse termvectors( // ----- Endpoint: update /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1896,7 +1917,8 @@ public UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1913,7 +1935,8 @@ public final UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @see Documentation @@ -1932,7 +1955,8 @@ public UpdateResponse update( } /** - * Updates a document with a script or partial document. + * Update a document. Updates a document by running a script or passing a + * partial document. * * @param fn * a function that initializes a builder to create the @@ -1951,9 +1975,10 @@ public final UpdateResponse update( // ----- Endpoint: update_by_query /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @see Documentation @@ -1969,9 +1994,10 @@ public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request) } /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java index 4c1818f1c..66ebb9d8c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/KnnQuery.java @@ -72,6 +72,9 @@ public class KnnQuery extends QueryBase implements QueryVariant { @Nullable private final Integer numCandidates; + @Nullable + private final Integer k; + private final List filter; @Nullable @@ -86,6 +89,7 @@ private KnnQuery(Builder builder) { this.queryVector = ApiTypeHelper.unmodifiable(builder.queryVector); this.queryVectorBuilder = builder.queryVectorBuilder; this.numCandidates = builder.numCandidates; + this.k = builder.k; this.filter = ApiTypeHelper.unmodifiable(builder.filter); this.similarity = builder.similarity; @@ -142,6 +146,16 @@ public final Integer numCandidates() { return this.numCandidates; } + /** + * The final number of nearest neighbors to return as top hits + *

+ * API name: {@code k} + */ + @Nullable + public final Integer k() { + return this.k; + } + /** * Filters for the kNN search query *

@@ -186,6 +200,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("num_candidates"); generator.write(this.numCandidates); + } + if (this.k != null) { + generator.writeKey("k"); + generator.write(this.k); + } if (ApiTypeHelper.isDefined(this.filter)) { generator.writeKey("filter"); @@ -223,6 +242,9 @@ public static class Builder extends QueryBase.AbstractBuilder implement @Nullable private Integer numCandidates; + @Nullable + private Integer k; + @Nullable private List filter; @@ -295,6 +317,16 @@ public final Builder numCandidates(@Nullable Integer value) { return this; } + /** + * The final number of nearest neighbors to return as top hits + *

+ * API name: {@code k} + */ + public final Builder k(@Nullable Integer value) { + this.k = value; + return this; + } + /** * Filters for the kNN search query *

@@ -373,6 +405,7 @@ protected static void setupKnnQueryDeserializer(ObjectDeserializer - * API name: {@code window_size} + * API name: {@code rank_window_size} */ @Nullable - public final Long windowSize() { - return this.windowSize; + public final Long rankWindowSize() { + return this.rankWindowSize; } /** @@ -121,9 +121,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.rankConstant); } - if (this.windowSize != null) { - generator.writeKey("window_size"); - generator.write(this.windowSize); + if (this.rankWindowSize != null) { + generator.writeKey("rank_window_size"); + generator.write(this.rankWindowSize); } @@ -145,7 +145,7 @@ public static class Builder extends RankBase.AbstractBuilder implements private Long rankConstant; @Nullable - private Long windowSize; + private Long rankWindowSize; /** * How much influence documents in individual result sets per query have over @@ -161,10 +161,10 @@ public final Builder rankConstant(@Nullable Long value) { /** * Size of the individual result sets per query *

- * API name: {@code window_size} + * API name: {@code rank_window_size} */ - public final Builder windowSize(@Nullable Long value) { - this.windowSize = value; + public final Builder rankWindowSize(@Nullable Long value) { + this.rankWindowSize = value; return this; } @@ -197,7 +197,7 @@ public RrfRank build() { protected static void setupRrfRankDeserializer(ObjectDeserializer op) { op.add(Builder::rankConstant, JsonpDeserializer.longDeserializer(), "rank_constant"); - op.add(Builder::windowSize, JsonpDeserializer.longDeserializer(), "window_size"); + op.add(Builder::rankWindowSize, JsonpDeserializer.longDeserializer(), "rank_window_size"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java index 78fbdec16..6108a2b94 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Analyzer.java @@ -72,32 +72,104 @@ public class Analyzer implements OpenTaggedUnion, JsonpSe */ public enum Kind implements JsonEnum { + Arabic("arabic"), + + Armenian("armenian"), + + Basque("basque"), + + Bengali("bengali"), + + Brazilian("brazilian"), + + Bulgarian("bulgarian"), + + Catalan("catalan"), + + Chinese("chinese"), + + Cjk("cjk"), + Custom("custom"), + Czech("czech"), + + Danish("danish"), + Dutch("dutch"), + English("english"), + + Estonian("estonian"), + Fingerprint("fingerprint"), + Finnish("finnish"), + + French("french"), + + Galician("galician"), + + German("german"), + + Greek("greek"), + + Hindi("hindi"), + + Hungarian("hungarian"), + IcuAnalyzer("icu_analyzer"), + Indonesian("indonesian"), + + Irish("irish"), + + Italian("italian"), + Keyword("keyword"), Kuromoji("kuromoji"), Language("language"), + Latvian("latvian"), + + Lithuanian("lithuanian"), + Nori("nori"), + Norwegian("norwegian"), + Pattern("pattern"), + Persian("persian"), + + Portuguese("portuguese"), + + Romanian("romanian"), + + Russian("russian"), + + Serbian("serbian"), + Simple("simple"), Snowball("snowball"), + Sorani("sorani"), + + Spanish("spanish"), + Standard("standard"), Stop("stop"), + Swedish("swedish"), + + Thai("thai"), + + Turkish("turkish"), + Whitespace("whitespace"), /** A custom {@code Analyzer} defined by a plugin */ @@ -161,326 +233,1144 @@ public Analyzer(String kind, JsonData value) { } /** - * Is this variant instance of kind {@code custom}? + * Is this variant instance of kind {@code arabic}? */ - public boolean isCustom() { - return _kind == Kind.Custom; + public boolean isArabic() { + return _kind == Kind.Arabic; } /** - * Get the {@code custom} variant value. + * Get the {@code arabic} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code custom} kind. + * if the current variant is not of the {@code arabic} kind. */ - public CustomAnalyzer custom() { - return TaggedUnionUtils.get(this, Kind.Custom); + public ArabicAnalyzer arabic() { + return TaggedUnionUtils.get(this, Kind.Arabic); } /** - * Is this variant instance of kind {@code dutch}? + * Is this variant instance of kind {@code armenian}? */ - public boolean isDutch() { - return _kind == Kind.Dutch; + public boolean isArmenian() { + return _kind == Kind.Armenian; } /** - * Get the {@code dutch} variant value. + * Get the {@code armenian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code dutch} kind. + * if the current variant is not of the {@code armenian} kind. */ - public DutchAnalyzer dutch() { - return TaggedUnionUtils.get(this, Kind.Dutch); + public ArmenianAnalyzer armenian() { + return TaggedUnionUtils.get(this, Kind.Armenian); } /** - * Is this variant instance of kind {@code fingerprint}? + * Is this variant instance of kind {@code basque}? */ - public boolean isFingerprint() { - return _kind == Kind.Fingerprint; + public boolean isBasque() { + return _kind == Kind.Basque; } /** - * Get the {@code fingerprint} variant value. + * Get the {@code basque} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code fingerprint} kind. + * if the current variant is not of the {@code basque} kind. */ - public FingerprintAnalyzer fingerprint() { - return TaggedUnionUtils.get(this, Kind.Fingerprint); + public BasqueAnalyzer basque() { + return TaggedUnionUtils.get(this, Kind.Basque); } /** - * Is this variant instance of kind {@code icu_analyzer}? + * Is this variant instance of kind {@code bengali}? */ - public boolean isIcuAnalyzer() { - return _kind == Kind.IcuAnalyzer; + public boolean isBengali() { + return _kind == Kind.Bengali; } /** - * Get the {@code icu_analyzer} variant value. + * Get the {@code bengali} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code icu_analyzer} kind. + * if the current variant is not of the {@code bengali} kind. */ - public IcuAnalyzer icuAnalyzer() { - return TaggedUnionUtils.get(this, Kind.IcuAnalyzer); + public BengaliAnalyzer bengali() { + return TaggedUnionUtils.get(this, Kind.Bengali); } /** - * Is this variant instance of kind {@code keyword}? + * Is this variant instance of kind {@code brazilian}? */ - public boolean isKeyword() { - return _kind == Kind.Keyword; + public boolean isBrazilian() { + return _kind == Kind.Brazilian; } /** - * Get the {@code keyword} variant value. + * Get the {@code brazilian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code keyword} kind. + * if the current variant is not of the {@code brazilian} kind. */ - public KeywordAnalyzer keyword() { - return TaggedUnionUtils.get(this, Kind.Keyword); + public BrazilianAnalyzer brazilian() { + return TaggedUnionUtils.get(this, Kind.Brazilian); } /** - * Is this variant instance of kind {@code kuromoji}? + * Is this variant instance of kind {@code bulgarian}? */ - public boolean isKuromoji() { - return _kind == Kind.Kuromoji; + public boolean isBulgarian() { + return _kind == Kind.Bulgarian; } /** - * Get the {@code kuromoji} variant value. + * Get the {@code bulgarian} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code kuromoji} kind. + * if the current variant is not of the {@code bulgarian} kind. */ - public KuromojiAnalyzer kuromoji() { - return TaggedUnionUtils.get(this, Kind.Kuromoji); + public BulgarianAnalyzer bulgarian() { + return TaggedUnionUtils.get(this, Kind.Bulgarian); } /** - * Is this variant instance of kind {@code language}? + * Is this variant instance of kind {@code catalan}? */ - public boolean isLanguage() { - return _kind == Kind.Language; + public boolean isCatalan() { + return _kind == Kind.Catalan; } /** - * Get the {@code language} variant value. + * Get the {@code catalan} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code language} kind. + * if the current variant is not of the {@code catalan} kind. */ - public LanguageAnalyzer language() { - return TaggedUnionUtils.get(this, Kind.Language); + public CatalanAnalyzer catalan() { + return TaggedUnionUtils.get(this, Kind.Catalan); } /** - * Is this variant instance of kind {@code nori}? + * Is this variant instance of kind {@code chinese}? */ - public boolean isNori() { - return _kind == Kind.Nori; + public boolean isChinese() { + return _kind == Kind.Chinese; } /** - * Get the {@code nori} variant value. + * Get the {@code chinese} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code nori} kind. + * if the current variant is not of the {@code chinese} kind. */ - public NoriAnalyzer nori() { - return TaggedUnionUtils.get(this, Kind.Nori); + public ChineseAnalyzer chinese() { + return TaggedUnionUtils.get(this, Kind.Chinese); } /** - * Is this variant instance of kind {@code pattern}? + * Is this variant instance of kind {@code cjk}? */ - public boolean isPattern() { - return _kind == Kind.Pattern; + public boolean isCjk() { + return _kind == Kind.Cjk; } /** - * Get the {@code pattern} variant value. + * Get the {@code cjk} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code pattern} kind. + * if the current variant is not of the {@code cjk} kind. */ - public PatternAnalyzer pattern() { - return TaggedUnionUtils.get(this, Kind.Pattern); + public CjkAnalyzer cjk() { + return TaggedUnionUtils.get(this, Kind.Cjk); } /** - * Is this variant instance of kind {@code simple}? + * Is this variant instance of kind {@code custom}? */ - public boolean isSimple() { - return _kind == Kind.Simple; + public boolean isCustom() { + return _kind == Kind.Custom; } /** - * Get the {@code simple} variant value. + * Get the {@code custom} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code simple} kind. + * if the current variant is not of the {@code custom} kind. */ - public SimpleAnalyzer simple() { - return TaggedUnionUtils.get(this, Kind.Simple); + public CustomAnalyzer custom() { + return TaggedUnionUtils.get(this, Kind.Custom); } /** - * Is this variant instance of kind {@code snowball}? + * Is this variant instance of kind {@code czech}? */ - public boolean isSnowball() { - return _kind == Kind.Snowball; + public boolean isCzech() { + return _kind == Kind.Czech; } /** - * Get the {@code snowball} variant value. + * Get the {@code czech} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code snowball} kind. + * if the current variant is not of the {@code czech} kind. */ - public SnowballAnalyzer snowball() { - return TaggedUnionUtils.get(this, Kind.Snowball); + public CzechAnalyzer czech() { + return TaggedUnionUtils.get(this, Kind.Czech); } /** - * Is this variant instance of kind {@code standard}? + * Is this variant instance of kind {@code danish}? */ - public boolean isStandard() { - return _kind == Kind.Standard; + public boolean isDanish() { + return _kind == Kind.Danish; } /** - * Get the {@code standard} variant value. + * Get the {@code danish} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code standard} kind. + * if the current variant is not of the {@code danish} kind. */ - public StandardAnalyzer standard() { - return TaggedUnionUtils.get(this, Kind.Standard); + public DanishAnalyzer danish() { + return TaggedUnionUtils.get(this, Kind.Danish); } /** - * Is this variant instance of kind {@code stop}? + * Is this variant instance of kind {@code dutch}? */ - public boolean isStop() { - return _kind == Kind.Stop; + public boolean isDutch() { + return _kind == Kind.Dutch; } /** - * Get the {@code stop} variant value. + * Get the {@code dutch} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code stop} kind. + * if the current variant is not of the {@code dutch} kind. */ - public StopAnalyzer stop() { - return TaggedUnionUtils.get(this, Kind.Stop); + public DutchAnalyzer dutch() { + return TaggedUnionUtils.get(this, Kind.Dutch); } /** - * Is this variant instance of kind {@code whitespace}? + * Is this variant instance of kind {@code english}? */ - public boolean isWhitespace() { - return _kind == Kind.Whitespace; + public boolean isEnglish() { + return _kind == Kind.English; } /** - * Get the {@code whitespace} variant value. + * Get the {@code english} variant value. * * @throws IllegalStateException - * if the current variant is not of the {@code whitespace} kind. + * if the current variant is not of the {@code english} kind. */ - public WhitespaceAnalyzer whitespace() { - return TaggedUnionUtils.get(this, Kind.Whitespace); + public EnglishAnalyzer english() { + return TaggedUnionUtils.get(this, Kind.English); } - @Nullable - private final String _customKind; + /** + * Is this variant instance of kind {@code estonian}? + */ + public boolean isEstonian() { + return _kind == Kind.Estonian; + } /** - * Is this a custom {@code Analyzer} defined by a plugin? + * Get the {@code estonian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code estonian} kind. */ - public boolean _isCustom() { - return _kind == Kind._Custom; + public EstonianAnalyzer estonian() { + return TaggedUnionUtils.get(this, Kind.Estonian); } /** - * Get the actual kind when {@code _kind()} equals {@link Kind#_Custom} - * (plugin-defined variant). + * Is this variant instance of kind {@code fingerprint}? */ - @Nullable - public final String _customKind() { - return _customKind; + public boolean isFingerprint() { + return _kind == Kind.Fingerprint; } /** - * Get the custom plugin-defined variant value. + * Get the {@code fingerprint} variant value. * * @throws IllegalStateException - * if the current variant is not {@link Kind#_Custom}. + * if the current variant is not of the {@code fingerprint} kind. */ - public JsonData _custom() { - return TaggedUnionUtils.get(this, Kind._Custom); + public FingerprintAnalyzer fingerprint() { + return TaggedUnionUtils.get(this, Kind.Fingerprint); } - @Override - public void serialize(JsonGenerator generator, JsonpMapper mapper) { + /** + * Is this variant instance of kind {@code finnish}? + */ + public boolean isFinnish() { + return _kind == Kind.Finnish; + } - mapper.serialize(_value, generator); + /** + * Get the {@code finnish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code finnish} kind. + */ + public FinnishAnalyzer finnish() { + return TaggedUnionUtils.get(this, Kind.Finnish); + } + /** + * Is this variant instance of kind {@code french}? + */ + public boolean isFrench() { + return _kind == Kind.French; } - @Override - public String toString() { - return JsonpUtils.toString(this); + /** + * Get the {@code french} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code french} kind. + */ + public FrenchAnalyzer french() { + return TaggedUnionUtils.get(this, Kind.French); } - public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private Kind _kind; - private Object _value; - private String _customKind; + /** + * Is this variant instance of kind {@code galician}? + */ + public boolean isGalician() { + return _kind == Kind.Galician; + } - @Override - protected Builder self() { - return this; - } - public ObjectBuilder custom(CustomAnalyzer v) { - this._kind = Kind.Custom; - this._value = v; - return this; - } + /** + * Get the {@code galician} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code galician} kind. + */ + public GalicianAnalyzer galician() { + return TaggedUnionUtils.get(this, Kind.Galician); + } - public ObjectBuilder custom(Function> fn) { - return this.custom(fn.apply(new CustomAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code german}? + */ + public boolean isGerman() { + return _kind == Kind.German; + } - public ObjectBuilder dutch(DutchAnalyzer v) { - this._kind = Kind.Dutch; - this._value = v; - return this; - } + /** + * Get the {@code german} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code german} kind. + */ + public GermanAnalyzer german() { + return TaggedUnionUtils.get(this, Kind.German); + } - public ObjectBuilder dutch(Function> fn) { - return this.dutch(fn.apply(new DutchAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code greek}? + */ + public boolean isGreek() { + return _kind == Kind.Greek; + } - public ObjectBuilder fingerprint(FingerprintAnalyzer v) { - this._kind = Kind.Fingerprint; - this._value = v; - return this; - } + /** + * Get the {@code greek} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code greek} kind. + */ + public GreekAnalyzer greek() { + return TaggedUnionUtils.get(this, Kind.Greek); + } - public ObjectBuilder fingerprint( - Function> fn) { - return this.fingerprint(fn.apply(new FingerprintAnalyzer.Builder()).build()); - } + /** + * Is this variant instance of kind {@code hindi}? + */ + public boolean isHindi() { + return _kind == Kind.Hindi; + } - public ObjectBuilder icuAnalyzer(IcuAnalyzer v) { - this._kind = Kind.IcuAnalyzer; + /** + * Get the {@code hindi} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code hindi} kind. + */ + public HindiAnalyzer hindi() { + return TaggedUnionUtils.get(this, Kind.Hindi); + } + + /** + * Is this variant instance of kind {@code hungarian}? + */ + public boolean isHungarian() { + return _kind == Kind.Hungarian; + } + + /** + * Get the {@code hungarian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code hungarian} kind. + */ + public HungarianAnalyzer hungarian() { + return TaggedUnionUtils.get(this, Kind.Hungarian); + } + + /** + * Is this variant instance of kind {@code icu_analyzer}? + */ + public boolean isIcuAnalyzer() { + return _kind == Kind.IcuAnalyzer; + } + + /** + * Get the {@code icu_analyzer} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code icu_analyzer} kind. + */ + public IcuAnalyzer icuAnalyzer() { + return TaggedUnionUtils.get(this, Kind.IcuAnalyzer); + } + + /** + * Is this variant instance of kind {@code indonesian}? + */ + public boolean isIndonesian() { + return _kind == Kind.Indonesian; + } + + /** + * Get the {@code indonesian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code indonesian} kind. + */ + public IndonesianAnalyzer indonesian() { + return TaggedUnionUtils.get(this, Kind.Indonesian); + } + + /** + * Is this variant instance of kind {@code irish}? + */ + public boolean isIrish() { + return _kind == Kind.Irish; + } + + /** + * Get the {@code irish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code irish} kind. + */ + public IrishAnalyzer irish() { + return TaggedUnionUtils.get(this, Kind.Irish); + } + + /** + * Is this variant instance of kind {@code italian}? + */ + public boolean isItalian() { + return _kind == Kind.Italian; + } + + /** + * Get the {@code italian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code italian} kind. + */ + public ItalianAnalyzer italian() { + return TaggedUnionUtils.get(this, Kind.Italian); + } + + /** + * Is this variant instance of kind {@code keyword}? + */ + public boolean isKeyword() { + return _kind == Kind.Keyword; + } + + /** + * Get the {@code keyword} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code keyword} kind. + */ + public KeywordAnalyzer keyword() { + return TaggedUnionUtils.get(this, Kind.Keyword); + } + + /** + * Is this variant instance of kind {@code kuromoji}? + */ + public boolean isKuromoji() { + return _kind == Kind.Kuromoji; + } + + /** + * Get the {@code kuromoji} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code kuromoji} kind. + */ + public KuromojiAnalyzer kuromoji() { + return TaggedUnionUtils.get(this, Kind.Kuromoji); + } + + /** + * Is this variant instance of kind {@code language}? + */ + public boolean isLanguage() { + return _kind == Kind.Language; + } + + /** + * Get the {@code language} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code language} kind. + */ + public LanguageAnalyzer language() { + return TaggedUnionUtils.get(this, Kind.Language); + } + + /** + * Is this variant instance of kind {@code latvian}? + */ + public boolean isLatvian() { + return _kind == Kind.Latvian; + } + + /** + * Get the {@code latvian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code latvian} kind. + */ + public LatvianAnalyzer latvian() { + return TaggedUnionUtils.get(this, Kind.Latvian); + } + + /** + * Is this variant instance of kind {@code lithuanian}? + */ + public boolean isLithuanian() { + return _kind == Kind.Lithuanian; + } + + /** + * Get the {@code lithuanian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code lithuanian} kind. + */ + public LithuanianAnalyzer lithuanian() { + return TaggedUnionUtils.get(this, Kind.Lithuanian); + } + + /** + * Is this variant instance of kind {@code nori}? + */ + public boolean isNori() { + return _kind == Kind.Nori; + } + + /** + * Get the {@code nori} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code nori} kind. + */ + public NoriAnalyzer nori() { + return TaggedUnionUtils.get(this, Kind.Nori); + } + + /** + * Is this variant instance of kind {@code norwegian}? + */ + public boolean isNorwegian() { + return _kind == Kind.Norwegian; + } + + /** + * Get the {@code norwegian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code norwegian} kind. + */ + public NorwegianAnalyzer norwegian() { + return TaggedUnionUtils.get(this, Kind.Norwegian); + } + + /** + * Is this variant instance of kind {@code pattern}? + */ + public boolean isPattern() { + return _kind == Kind.Pattern; + } + + /** + * Get the {@code pattern} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code pattern} kind. + */ + public PatternAnalyzer pattern() { + return TaggedUnionUtils.get(this, Kind.Pattern); + } + + /** + * Is this variant instance of kind {@code persian}? + */ + public boolean isPersian() { + return _kind == Kind.Persian; + } + + /** + * Get the {@code persian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code persian} kind. + */ + public PersianAnalyzer persian() { + return TaggedUnionUtils.get(this, Kind.Persian); + } + + /** + * Is this variant instance of kind {@code portuguese}? + */ + public boolean isPortuguese() { + return _kind == Kind.Portuguese; + } + + /** + * Get the {@code portuguese} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code portuguese} kind. + */ + public PortugueseAnalyzer portuguese() { + return TaggedUnionUtils.get(this, Kind.Portuguese); + } + + /** + * Is this variant instance of kind {@code romanian}? + */ + public boolean isRomanian() { + return _kind == Kind.Romanian; + } + + /** + * Get the {@code romanian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code romanian} kind. + */ + public RomanianAnalyzer romanian() { + return TaggedUnionUtils.get(this, Kind.Romanian); + } + + /** + * Is this variant instance of kind {@code russian}? + */ + public boolean isRussian() { + return _kind == Kind.Russian; + } + + /** + * Get the {@code russian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code russian} kind. + */ + public RussianAnalyzer russian() { + return TaggedUnionUtils.get(this, Kind.Russian); + } + + /** + * Is this variant instance of kind {@code serbian}? + */ + public boolean isSerbian() { + return _kind == Kind.Serbian; + } + + /** + * Get the {@code serbian} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code serbian} kind. + */ + public SerbianAnalyzer serbian() { + return TaggedUnionUtils.get(this, Kind.Serbian); + } + + /** + * Is this variant instance of kind {@code simple}? + */ + public boolean isSimple() { + return _kind == Kind.Simple; + } + + /** + * Get the {@code simple} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code simple} kind. + */ + public SimpleAnalyzer simple() { + return TaggedUnionUtils.get(this, Kind.Simple); + } + + /** + * Is this variant instance of kind {@code snowball}? + */ + public boolean isSnowball() { + return _kind == Kind.Snowball; + } + + /** + * Get the {@code snowball} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code snowball} kind. + */ + public SnowballAnalyzer snowball() { + return TaggedUnionUtils.get(this, Kind.Snowball); + } + + /** + * Is this variant instance of kind {@code sorani}? + */ + public boolean isSorani() { + return _kind == Kind.Sorani; + } + + /** + * Get the {@code sorani} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code sorani} kind. + */ + public SoraniAnalyzer sorani() { + return TaggedUnionUtils.get(this, Kind.Sorani); + } + + /** + * Is this variant instance of kind {@code spanish}? + */ + public boolean isSpanish() { + return _kind == Kind.Spanish; + } + + /** + * Get the {@code spanish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code spanish} kind. + */ + public SpanishAnalyzer spanish() { + return TaggedUnionUtils.get(this, Kind.Spanish); + } + + /** + * Is this variant instance of kind {@code standard}? + */ + public boolean isStandard() { + return _kind == Kind.Standard; + } + + /** + * Get the {@code standard} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code standard} kind. + */ + public StandardAnalyzer standard() { + return TaggedUnionUtils.get(this, Kind.Standard); + } + + /** + * Is this variant instance of kind {@code stop}? + */ + public boolean isStop() { + return _kind == Kind.Stop; + } + + /** + * Get the {@code stop} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code stop} kind. + */ + public StopAnalyzer stop() { + return TaggedUnionUtils.get(this, Kind.Stop); + } + + /** + * Is this variant instance of kind {@code swedish}? + */ + public boolean isSwedish() { + return _kind == Kind.Swedish; + } + + /** + * Get the {@code swedish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code swedish} kind. + */ + public SwedishAnalyzer swedish() { + return TaggedUnionUtils.get(this, Kind.Swedish); + } + + /** + * Is this variant instance of kind {@code thai}? + */ + public boolean isThai() { + return _kind == Kind.Thai; + } + + /** + * Get the {@code thai} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code thai} kind. + */ + public ThaiAnalyzer thai() { + return TaggedUnionUtils.get(this, Kind.Thai); + } + + /** + * Is this variant instance of kind {@code turkish}? + */ + public boolean isTurkish() { + return _kind == Kind.Turkish; + } + + /** + * Get the {@code turkish} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code turkish} kind. + */ + public TurkishAnalyzer turkish() { + return TaggedUnionUtils.get(this, Kind.Turkish); + } + + /** + * Is this variant instance of kind {@code whitespace}? + */ + public boolean isWhitespace() { + return _kind == Kind.Whitespace; + } + + /** + * Get the {@code whitespace} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code whitespace} kind. + */ + public WhitespaceAnalyzer whitespace() { + return TaggedUnionUtils.get(this, Kind.Whitespace); + } + + @Nullable + private final String _customKind; + + /** + * Is this a custom {@code Analyzer} defined by a plugin? + */ + public boolean _isCustom() { + return _kind == Kind._Custom; + } + + /** + * Get the actual kind when {@code _kind()} equals {@link Kind#_Custom} + * (plugin-defined variant). + */ + @Nullable + public final String _customKind() { + return _customKind; + } + + /** + * Get the custom plugin-defined variant value. + * + * @throws IllegalStateException + * if the current variant is not {@link Kind#_Custom}. + */ + public JsonData _custom() { + return TaggedUnionUtils.get(this, Kind._Custom); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + mapper.serialize(_value, generator); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + private String _customKind; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder arabic(ArabicAnalyzer v) { + this._kind = Kind.Arabic; + this._value = v; + return this; + } + + public ObjectBuilder arabic(Function> fn) { + return this.arabic(fn.apply(new ArabicAnalyzer.Builder()).build()); + } + + public ObjectBuilder armenian(ArmenianAnalyzer v) { + this._kind = Kind.Armenian; + this._value = v; + return this; + } + + public ObjectBuilder armenian( + Function> fn) { + return this.armenian(fn.apply(new ArmenianAnalyzer.Builder()).build()); + } + + public ObjectBuilder basque(BasqueAnalyzer v) { + this._kind = Kind.Basque; + this._value = v; + return this; + } + + public ObjectBuilder basque(Function> fn) { + return this.basque(fn.apply(new BasqueAnalyzer.Builder()).build()); + } + + public ObjectBuilder bengali(BengaliAnalyzer v) { + this._kind = Kind.Bengali; + this._value = v; + return this; + } + + public ObjectBuilder bengali(Function> fn) { + return this.bengali(fn.apply(new BengaliAnalyzer.Builder()).build()); + } + + public ObjectBuilder brazilian(BrazilianAnalyzer v) { + this._kind = Kind.Brazilian; + this._value = v; + return this; + } + + public ObjectBuilder brazilian( + Function> fn) { + return this.brazilian(fn.apply(new BrazilianAnalyzer.Builder()).build()); + } + + public ObjectBuilder bulgarian(BulgarianAnalyzer v) { + this._kind = Kind.Bulgarian; + this._value = v; + return this; + } + + public ObjectBuilder bulgarian( + Function> fn) { + return this.bulgarian(fn.apply(new BulgarianAnalyzer.Builder()).build()); + } + + public ObjectBuilder catalan(CatalanAnalyzer v) { + this._kind = Kind.Catalan; + this._value = v; + return this; + } + + public ObjectBuilder catalan(Function> fn) { + return this.catalan(fn.apply(new CatalanAnalyzer.Builder()).build()); + } + + public ObjectBuilder chinese(ChineseAnalyzer v) { + this._kind = Kind.Chinese; + this._value = v; + return this; + } + + public ObjectBuilder chinese(Function> fn) { + return this.chinese(fn.apply(new ChineseAnalyzer.Builder()).build()); + } + + public ObjectBuilder cjk(CjkAnalyzer v) { + this._kind = Kind.Cjk; + this._value = v; + return this; + } + + public ObjectBuilder cjk(Function> fn) { + return this.cjk(fn.apply(new CjkAnalyzer.Builder()).build()); + } + + public ObjectBuilder custom(CustomAnalyzer v) { + this._kind = Kind.Custom; + this._value = v; + return this; + } + + public ObjectBuilder custom(Function> fn) { + return this.custom(fn.apply(new CustomAnalyzer.Builder()).build()); + } + + public ObjectBuilder czech(CzechAnalyzer v) { + this._kind = Kind.Czech; + this._value = v; + return this; + } + + public ObjectBuilder czech(Function> fn) { + return this.czech(fn.apply(new CzechAnalyzer.Builder()).build()); + } + + public ObjectBuilder danish(DanishAnalyzer v) { + this._kind = Kind.Danish; + this._value = v; + return this; + } + + public ObjectBuilder danish(Function> fn) { + return this.danish(fn.apply(new DanishAnalyzer.Builder()).build()); + } + + public ObjectBuilder dutch(DutchAnalyzer v) { + this._kind = Kind.Dutch; + this._value = v; + return this; + } + + public ObjectBuilder dutch(Function> fn) { + return this.dutch(fn.apply(new DutchAnalyzer.Builder()).build()); + } + + public ObjectBuilder english(EnglishAnalyzer v) { + this._kind = Kind.English; + this._value = v; + return this; + } + + public ObjectBuilder english(Function> fn) { + return this.english(fn.apply(new EnglishAnalyzer.Builder()).build()); + } + + public ObjectBuilder estonian(EstonianAnalyzer v) { + this._kind = Kind.Estonian; + this._value = v; + return this; + } + + public ObjectBuilder estonian( + Function> fn) { + return this.estonian(fn.apply(new EstonianAnalyzer.Builder()).build()); + } + + public ObjectBuilder fingerprint(FingerprintAnalyzer v) { + this._kind = Kind.Fingerprint; + this._value = v; + return this; + } + + public ObjectBuilder fingerprint( + Function> fn) { + return this.fingerprint(fn.apply(new FingerprintAnalyzer.Builder()).build()); + } + + public ObjectBuilder finnish(FinnishAnalyzer v) { + this._kind = Kind.Finnish; + this._value = v; + return this; + } + + public ObjectBuilder finnish(Function> fn) { + return this.finnish(fn.apply(new FinnishAnalyzer.Builder()).build()); + } + + public ObjectBuilder french(FrenchAnalyzer v) { + this._kind = Kind.French; + this._value = v; + return this; + } + + public ObjectBuilder french(Function> fn) { + return this.french(fn.apply(new FrenchAnalyzer.Builder()).build()); + } + + public ObjectBuilder galician(GalicianAnalyzer v) { + this._kind = Kind.Galician; + this._value = v; + return this; + } + + public ObjectBuilder galician( + Function> fn) { + return this.galician(fn.apply(new GalicianAnalyzer.Builder()).build()); + } + + public ObjectBuilder german(GermanAnalyzer v) { + this._kind = Kind.German; + this._value = v; + return this; + } + + public ObjectBuilder german(Function> fn) { + return this.german(fn.apply(new GermanAnalyzer.Builder()).build()); + } + + public ObjectBuilder greek(GreekAnalyzer v) { + this._kind = Kind.Greek; + this._value = v; + return this; + } + + public ObjectBuilder greek(Function> fn) { + return this.greek(fn.apply(new GreekAnalyzer.Builder()).build()); + } + + public ObjectBuilder hindi(HindiAnalyzer v) { + this._kind = Kind.Hindi; + this._value = v; + return this; + } + + public ObjectBuilder hindi(Function> fn) { + return this.hindi(fn.apply(new HindiAnalyzer.Builder()).build()); + } + + public ObjectBuilder hungarian(HungarianAnalyzer v) { + this._kind = Kind.Hungarian; + this._value = v; + return this; + } + + public ObjectBuilder hungarian( + Function> fn) { + return this.hungarian(fn.apply(new HungarianAnalyzer.Builder()).build()); + } + + public ObjectBuilder icuAnalyzer(IcuAnalyzer v) { + this._kind = Kind.IcuAnalyzer; this._value = v; return this; } @@ -489,6 +1379,37 @@ public ObjectBuilder icuAnalyzer(Function indonesian(IndonesianAnalyzer v) { + this._kind = Kind.Indonesian; + this._value = v; + return this; + } + + public ObjectBuilder indonesian( + Function> fn) { + return this.indonesian(fn.apply(new IndonesianAnalyzer.Builder()).build()); + } + + public ObjectBuilder irish(IrishAnalyzer v) { + this._kind = Kind.Irish; + this._value = v; + return this; + } + + public ObjectBuilder irish(Function> fn) { + return this.irish(fn.apply(new IrishAnalyzer.Builder()).build()); + } + + public ObjectBuilder italian(ItalianAnalyzer v) { + this._kind = Kind.Italian; + this._value = v; + return this; + } + + public ObjectBuilder italian(Function> fn) { + return this.italian(fn.apply(new ItalianAnalyzer.Builder()).build()); + } + public ObjectBuilder keyword(KeywordAnalyzer v) { this._kind = Kind.Keyword; this._value = v; @@ -521,6 +1442,27 @@ public ObjectBuilder language( return this.language(fn.apply(new LanguageAnalyzer.Builder()).build()); } + public ObjectBuilder latvian(LatvianAnalyzer v) { + this._kind = Kind.Latvian; + this._value = v; + return this; + } + + public ObjectBuilder latvian(Function> fn) { + return this.latvian(fn.apply(new LatvianAnalyzer.Builder()).build()); + } + + public ObjectBuilder lithuanian(LithuanianAnalyzer v) { + this._kind = Kind.Lithuanian; + this._value = v; + return this; + } + + public ObjectBuilder lithuanian( + Function> fn) { + return this.lithuanian(fn.apply(new LithuanianAnalyzer.Builder()).build()); + } + public ObjectBuilder nori(NoriAnalyzer v) { this._kind = Kind.Nori; this._value = v; @@ -531,6 +1473,17 @@ public ObjectBuilder nori(Function norwegian(NorwegianAnalyzer v) { + this._kind = Kind.Norwegian; + this._value = v; + return this; + } + + public ObjectBuilder norwegian( + Function> fn) { + return this.norwegian(fn.apply(new NorwegianAnalyzer.Builder()).build()); + } + public ObjectBuilder pattern(PatternAnalyzer v) { this._kind = Kind.Pattern; this._value = v; @@ -541,6 +1494,58 @@ public ObjectBuilder pattern(Function persian(PersianAnalyzer v) { + this._kind = Kind.Persian; + this._value = v; + return this; + } + + public ObjectBuilder persian(Function> fn) { + return this.persian(fn.apply(new PersianAnalyzer.Builder()).build()); + } + + public ObjectBuilder portuguese(PortugueseAnalyzer v) { + this._kind = Kind.Portuguese; + this._value = v; + return this; + } + + public ObjectBuilder portuguese( + Function> fn) { + return this.portuguese(fn.apply(new PortugueseAnalyzer.Builder()).build()); + } + + public ObjectBuilder romanian(RomanianAnalyzer v) { + this._kind = Kind.Romanian; + this._value = v; + return this; + } + + public ObjectBuilder romanian( + Function> fn) { + return this.romanian(fn.apply(new RomanianAnalyzer.Builder()).build()); + } + + public ObjectBuilder russian(RussianAnalyzer v) { + this._kind = Kind.Russian; + this._value = v; + return this; + } + + public ObjectBuilder russian(Function> fn) { + return this.russian(fn.apply(new RussianAnalyzer.Builder()).build()); + } + + public ObjectBuilder serbian(SerbianAnalyzer v) { + this._kind = Kind.Serbian; + this._value = v; + return this; + } + + public ObjectBuilder serbian(Function> fn) { + return this.serbian(fn.apply(new SerbianAnalyzer.Builder()).build()); + } + public ObjectBuilder simple(SimpleAnalyzer v) { this._kind = Kind.Simple; this._value = v; @@ -562,6 +1567,26 @@ public ObjectBuilder snowball( return this.snowball(fn.apply(new SnowballAnalyzer.Builder()).build()); } + public ObjectBuilder sorani(SoraniAnalyzer v) { + this._kind = Kind.Sorani; + this._value = v; + return this; + } + + public ObjectBuilder sorani(Function> fn) { + return this.sorani(fn.apply(new SoraniAnalyzer.Builder()).build()); + } + + public ObjectBuilder spanish(SpanishAnalyzer v) { + this._kind = Kind.Spanish; + this._value = v; + return this; + } + + public ObjectBuilder spanish(Function> fn) { + return this.spanish(fn.apply(new SpanishAnalyzer.Builder()).build()); + } + public ObjectBuilder standard(StandardAnalyzer v) { this._kind = Kind.Standard; this._value = v; @@ -583,6 +1608,36 @@ public ObjectBuilder stop(Function swedish(SwedishAnalyzer v) { + this._kind = Kind.Swedish; + this._value = v; + return this; + } + + public ObjectBuilder swedish(Function> fn) { + return this.swedish(fn.apply(new SwedishAnalyzer.Builder()).build()); + } + + public ObjectBuilder thai(ThaiAnalyzer v) { + this._kind = Kind.Thai; + this._value = v; + return this; + } + + public ObjectBuilder thai(Function> fn) { + return this.thai(fn.apply(new ThaiAnalyzer.Builder()).build()); + } + + public ObjectBuilder turkish(TurkishAnalyzer v) { + this._kind = Kind.Turkish; + this._value = v; + return this; + } + + public ObjectBuilder turkish(Function> fn) { + return this.turkish(fn.apply(new TurkishAnalyzer.Builder()).build()); + } + public ObjectBuilder whitespace(WhitespaceAnalyzer v) { this._kind = Kind.Whitespace; this._value = v; @@ -619,19 +1674,55 @@ public Analyzer build() { protected static void setupAnalyzerDeserializer(ObjectDeserializer op) { + op.add(Builder::arabic, ArabicAnalyzer._DESERIALIZER, "arabic"); + op.add(Builder::armenian, ArmenianAnalyzer._DESERIALIZER, "armenian"); + op.add(Builder::basque, BasqueAnalyzer._DESERIALIZER, "basque"); + op.add(Builder::bengali, BengaliAnalyzer._DESERIALIZER, "bengali"); + op.add(Builder::brazilian, BrazilianAnalyzer._DESERIALIZER, "brazilian"); + op.add(Builder::bulgarian, BulgarianAnalyzer._DESERIALIZER, "bulgarian"); + op.add(Builder::catalan, CatalanAnalyzer._DESERIALIZER, "catalan"); + op.add(Builder::chinese, ChineseAnalyzer._DESERIALIZER, "chinese"); + op.add(Builder::cjk, CjkAnalyzer._DESERIALIZER, "cjk"); op.add(Builder::custom, CustomAnalyzer._DESERIALIZER, "custom"); + op.add(Builder::czech, CzechAnalyzer._DESERIALIZER, "czech"); + op.add(Builder::danish, DanishAnalyzer._DESERIALIZER, "danish"); op.add(Builder::dutch, DutchAnalyzer._DESERIALIZER, "dutch"); + op.add(Builder::english, EnglishAnalyzer._DESERIALIZER, "english"); + op.add(Builder::estonian, EstonianAnalyzer._DESERIALIZER, "estonian"); op.add(Builder::fingerprint, FingerprintAnalyzer._DESERIALIZER, "fingerprint"); + op.add(Builder::finnish, FinnishAnalyzer._DESERIALIZER, "finnish"); + op.add(Builder::french, FrenchAnalyzer._DESERIALIZER, "french"); + op.add(Builder::galician, GalicianAnalyzer._DESERIALIZER, "galician"); + op.add(Builder::german, GermanAnalyzer._DESERIALIZER, "german"); + op.add(Builder::greek, GreekAnalyzer._DESERIALIZER, "greek"); + op.add(Builder::hindi, HindiAnalyzer._DESERIALIZER, "hindi"); + op.add(Builder::hungarian, HungarianAnalyzer._DESERIALIZER, "hungarian"); op.add(Builder::icuAnalyzer, IcuAnalyzer._DESERIALIZER, "icu_analyzer"); + op.add(Builder::indonesian, IndonesianAnalyzer._DESERIALIZER, "indonesian"); + op.add(Builder::irish, IrishAnalyzer._DESERIALIZER, "irish"); + op.add(Builder::italian, ItalianAnalyzer._DESERIALIZER, "italian"); op.add(Builder::keyword, KeywordAnalyzer._DESERIALIZER, "keyword"); op.add(Builder::kuromoji, KuromojiAnalyzer._DESERIALIZER, "kuromoji"); op.add(Builder::language, LanguageAnalyzer._DESERIALIZER, "language"); + op.add(Builder::latvian, LatvianAnalyzer._DESERIALIZER, "latvian"); + op.add(Builder::lithuanian, LithuanianAnalyzer._DESERIALIZER, "lithuanian"); op.add(Builder::nori, NoriAnalyzer._DESERIALIZER, "nori"); + op.add(Builder::norwegian, NorwegianAnalyzer._DESERIALIZER, "norwegian"); op.add(Builder::pattern, PatternAnalyzer._DESERIALIZER, "pattern"); + op.add(Builder::persian, PersianAnalyzer._DESERIALIZER, "persian"); + op.add(Builder::portuguese, PortugueseAnalyzer._DESERIALIZER, "portuguese"); + op.add(Builder::romanian, RomanianAnalyzer._DESERIALIZER, "romanian"); + op.add(Builder::russian, RussianAnalyzer._DESERIALIZER, "russian"); + op.add(Builder::serbian, SerbianAnalyzer._DESERIALIZER, "serbian"); op.add(Builder::simple, SimpleAnalyzer._DESERIALIZER, "simple"); op.add(Builder::snowball, SnowballAnalyzer._DESERIALIZER, "snowball"); + op.add(Builder::sorani, SoraniAnalyzer._DESERIALIZER, "sorani"); + op.add(Builder::spanish, SpanishAnalyzer._DESERIALIZER, "spanish"); op.add(Builder::standard, StandardAnalyzer._DESERIALIZER, "standard"); op.add(Builder::stop, StopAnalyzer._DESERIALIZER, "stop"); + op.add(Builder::swedish, SwedishAnalyzer._DESERIALIZER, "swedish"); + op.add(Builder::thai, ThaiAnalyzer._DESERIALIZER, "thai"); + op.add(Builder::turkish, TurkishAnalyzer._DESERIALIZER, "turkish"); op.add(Builder::whitespace, WhitespaceAnalyzer._DESERIALIZER, "whitespace"); op.setUnknownFieldHandler((builder, name, parser, mapper) -> { diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java index f43787382..77c01248c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerBuilders.java @@ -44,6 +44,166 @@ public class AnalyzerBuilders { private AnalyzerBuilders() { } + /** + * Creates a builder for the {@link ArabicAnalyzer arabic} {@code Analyzer} + * variant. + */ + public static ArabicAnalyzer.Builder arabic() { + return new ArabicAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ArabicAnalyzer arabic} {@code Analyzer} + * variant. + */ + public static Analyzer arabic(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.arabic(fn.apply(new ArabicAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ArmenianAnalyzer armenian} {@code Analyzer} + * variant. + */ + public static ArmenianAnalyzer.Builder armenian() { + return new ArmenianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ArmenianAnalyzer armenian} {@code Analyzer} + * variant. + */ + public static Analyzer armenian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.armenian(fn.apply(new ArmenianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BasqueAnalyzer basque} {@code Analyzer} + * variant. + */ + public static BasqueAnalyzer.Builder basque() { + return new BasqueAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BasqueAnalyzer basque} {@code Analyzer} + * variant. + */ + public static Analyzer basque(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.basque(fn.apply(new BasqueAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BengaliAnalyzer bengali} {@code Analyzer} + * variant. + */ + public static BengaliAnalyzer.Builder bengali() { + return new BengaliAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BengaliAnalyzer bengali} {@code Analyzer} + * variant. + */ + public static Analyzer bengali(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.bengali(fn.apply(new BengaliAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BrazilianAnalyzer brazilian} + * {@code Analyzer} variant. + */ + public static BrazilianAnalyzer.Builder brazilian() { + return new BrazilianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BrazilianAnalyzer brazilian} + * {@code Analyzer} variant. + */ + public static Analyzer brazilian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.brazilian(fn.apply(new BrazilianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link BulgarianAnalyzer bulgarian} + * {@code Analyzer} variant. + */ + public static BulgarianAnalyzer.Builder bulgarian() { + return new BulgarianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link BulgarianAnalyzer bulgarian} + * {@code Analyzer} variant. + */ + public static Analyzer bulgarian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.bulgarian(fn.apply(new BulgarianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CatalanAnalyzer catalan} {@code Analyzer} + * variant. + */ + public static CatalanAnalyzer.Builder catalan() { + return new CatalanAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link CatalanAnalyzer catalan} {@code Analyzer} + * variant. + */ + public static Analyzer catalan(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.catalan(fn.apply(new CatalanAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ChineseAnalyzer chinese} {@code Analyzer} + * variant. + */ + public static ChineseAnalyzer.Builder chinese() { + return new ChineseAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ChineseAnalyzer chinese} {@code Analyzer} + * variant. + */ + public static Analyzer chinese(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.chinese(fn.apply(new ChineseAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CjkAnalyzer cjk} {@code Analyzer} variant. + */ + public static CjkAnalyzer.Builder cjk() { + return new CjkAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link CjkAnalyzer cjk} {@code Analyzer} variant. + */ + public static Analyzer cjk(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.cjk(fn.apply(new CjkAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link CustomAnalyzer custom} {@code Analyzer} * variant. @@ -62,6 +222,42 @@ public static Analyzer custom(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.czech(fn.apply(new CzechAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link DanishAnalyzer danish} {@code Analyzer} + * variant. + */ + public static DanishAnalyzer.Builder danish() { + return new DanishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link DanishAnalyzer danish} {@code Analyzer} + * variant. + */ + public static Analyzer danish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.danish(fn.apply(new DanishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link DutchAnalyzer dutch} {@code Analyzer} * variant. @@ -80,6 +276,42 @@ public static Analyzer dutch(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.english(fn.apply(new EnglishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link EstonianAnalyzer estonian} {@code Analyzer} + * variant. + */ + public static EstonianAnalyzer.Builder estonian() { + return new EstonianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link EstonianAnalyzer estonian} {@code Analyzer} + * variant. + */ + public static Analyzer estonian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.estonian(fn.apply(new EstonianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link FingerprintAnalyzer fingerprint} * {@code Analyzer} variant. @@ -98,6 +330,132 @@ public static Analyzer fingerprint(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.finnish(fn.apply(new FinnishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link FrenchAnalyzer french} {@code Analyzer} + * variant. + */ + public static FrenchAnalyzer.Builder french() { + return new FrenchAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link FrenchAnalyzer french} {@code Analyzer} + * variant. + */ + public static Analyzer french(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.french(fn.apply(new FrenchAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GalicianAnalyzer galician} {@code Analyzer} + * variant. + */ + public static GalicianAnalyzer.Builder galician() { + return new GalicianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GalicianAnalyzer galician} {@code Analyzer} + * variant. + */ + public static Analyzer galician(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.galician(fn.apply(new GalicianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GermanAnalyzer german} {@code Analyzer} + * variant. + */ + public static GermanAnalyzer.Builder german() { + return new GermanAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GermanAnalyzer german} {@code Analyzer} + * variant. + */ + public static Analyzer german(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.german(fn.apply(new GermanAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link GreekAnalyzer greek} {@code Analyzer} + * variant. + */ + public static GreekAnalyzer.Builder greek() { + return new GreekAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link GreekAnalyzer greek} {@code Analyzer} + * variant. + */ + public static Analyzer greek(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.greek(fn.apply(new GreekAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link HindiAnalyzer hindi} {@code Analyzer} + * variant. + */ + public static HindiAnalyzer.Builder hindi() { + return new HindiAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link HindiAnalyzer hindi} {@code Analyzer} + * variant. + */ + public static Analyzer hindi(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.hindi(fn.apply(new HindiAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link HungarianAnalyzer hungarian} + * {@code Analyzer} variant. + */ + public static HungarianAnalyzer.Builder hungarian() { + return new HungarianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link HungarianAnalyzer hungarian} + * {@code Analyzer} variant. + */ + public static Analyzer hungarian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.hungarian(fn.apply(new HungarianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link IcuAnalyzer icu_analyzer} {@code Analyzer} * variant. @@ -116,6 +474,60 @@ public static Analyzer icuAnalyzer(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.indonesian(fn.apply(new IndonesianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link IrishAnalyzer irish} {@code Analyzer} + * variant. + */ + public static IrishAnalyzer.Builder irish() { + return new IrishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link IrishAnalyzer irish} {@code Analyzer} + * variant. + */ + public static Analyzer irish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.irish(fn.apply(new IrishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ItalianAnalyzer italian} {@code Analyzer} + * variant. + */ + public static ItalianAnalyzer.Builder italian() { + return new ItalianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ItalianAnalyzer italian} {@code Analyzer} + * variant. + */ + public static Analyzer italian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.italian(fn.apply(new ItalianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link KeywordAnalyzer keyword} {@code Analyzer} * variant. @@ -170,6 +582,42 @@ public static Analyzer language(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.latvian(fn.apply(new LatvianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link LithuanianAnalyzer lithuanian} + * {@code Analyzer} variant. + */ + public static LithuanianAnalyzer.Builder lithuanian() { + return new LithuanianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link LithuanianAnalyzer lithuanian} + * {@code Analyzer} variant. + */ + public static Analyzer lithuanian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.lithuanian(fn.apply(new LithuanianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link NoriAnalyzer nori} {@code Analyzer} variant. */ @@ -186,6 +634,24 @@ public static Analyzer nori(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.norwegian(fn.apply(new NorwegianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link PatternAnalyzer pattern} {@code Analyzer} * variant. @@ -204,6 +670,96 @@ public static Analyzer pattern(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.persian(fn.apply(new PersianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link PortugueseAnalyzer portuguese} + * {@code Analyzer} variant. + */ + public static PortugueseAnalyzer.Builder portuguese() { + return new PortugueseAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link PortugueseAnalyzer portuguese} + * {@code Analyzer} variant. + */ + public static Analyzer portuguese(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.portuguese(fn.apply(new PortugueseAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RomanianAnalyzer romanian} {@code Analyzer} + * variant. + */ + public static RomanianAnalyzer.Builder romanian() { + return new RomanianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link RomanianAnalyzer romanian} {@code Analyzer} + * variant. + */ + public static Analyzer romanian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.romanian(fn.apply(new RomanianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RussianAnalyzer russian} {@code Analyzer} + * variant. + */ + public static RussianAnalyzer.Builder russian() { + return new RussianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link RussianAnalyzer russian} {@code Analyzer} + * variant. + */ + public static Analyzer russian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.russian(fn.apply(new RussianAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SerbianAnalyzer serbian} {@code Analyzer} + * variant. + */ + public static SerbianAnalyzer.Builder serbian() { + return new SerbianAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link SerbianAnalyzer serbian} {@code Analyzer} + * variant. + */ + public static Analyzer serbian(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.serbian(fn.apply(new SerbianAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link SimpleAnalyzer simple} {@code Analyzer} * variant. @@ -240,6 +796,42 @@ public static Analyzer snowball(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.sorani(fn.apply(new SoraniAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SpanishAnalyzer spanish} {@code Analyzer} + * variant. + */ + public static SpanishAnalyzer.Builder spanish() { + return new SpanishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link SpanishAnalyzer spanish} {@code Analyzer} + * variant. + */ + public static Analyzer spanish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.spanish(fn.apply(new SpanishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link StandardAnalyzer standard} {@code Analyzer} * variant. @@ -274,6 +866,58 @@ public static Analyzer stop(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.swedish(fn.apply(new SwedishAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ThaiAnalyzer thai} {@code Analyzer} variant. + */ + public static ThaiAnalyzer.Builder thai() { + return new ThaiAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link ThaiAnalyzer thai} {@code Analyzer} variant. + */ + public static Analyzer thai(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.thai(fn.apply(new ThaiAnalyzer.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link TurkishAnalyzer turkish} {@code Analyzer} + * variant. + */ + public static TurkishAnalyzer.Builder turkish() { + return new TurkishAnalyzer.Builder(); + } + + /** + * Creates a Analyzer of the {@link TurkishAnalyzer turkish} {@code Analyzer} + * variant. + */ + public static Analyzer turkish(Function> fn) { + Analyzer.Builder builder = new Analyzer.Builder(); + builder.turkish(fn.apply(new TurkishAnalyzer.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link WhitespaceAnalyzer whitespace} * {@code Analyzer} variant. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java new file mode 100644 index 000000000..ea64986f3 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArabicAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ArabicAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ArabicAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ArabicAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ArabicAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Arabic; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "arabic"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ArabicAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ArabicAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ArabicAnalyzer build() { + _checkSingleUse(); + + return new ArabicAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ArabicAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ArabicAnalyzer::setupArabicAnalyzerDeserializer); + + protected static void setupArabicAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java new file mode 100644 index 000000000..3e4da7101 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ArmenianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ArmenianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ArmenianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ArmenianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ArmenianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Armenian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "armenian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ArmenianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ArmenianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ArmenianAnalyzer build() { + _checkSingleUse(); + + return new ArmenianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ArmenianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ArmenianAnalyzer::setupArmenianAnalyzerDeserializer); + + protected static void setupArmenianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java new file mode 100644 index 000000000..6e9685bb4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BasqueAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BasqueAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BasqueAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BasqueAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BasqueAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Basque; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "basque"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BasqueAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BasqueAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BasqueAnalyzer build() { + _checkSingleUse(); + + return new BasqueAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BasqueAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + BasqueAnalyzer::setupBasqueAnalyzerDeserializer); + + protected static void setupBasqueAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java new file mode 100644 index 000000000..ff8e26057 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BengaliAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BengaliAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BengaliAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BengaliAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BengaliAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Bengali; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "bengali"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BengaliAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BengaliAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BengaliAnalyzer build() { + _checkSingleUse(); + + return new BengaliAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BengaliAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + BengaliAnalyzer::setupBengaliAnalyzerDeserializer); + + protected static void setupBengaliAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java new file mode 100644 index 000000000..b3ff95083 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BrazilianAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BrazilianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BrazilianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private BrazilianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static BrazilianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Brazilian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "brazilian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BrazilianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BrazilianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BrazilianAnalyzer build() { + _checkSingleUse(); + + return new BrazilianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BrazilianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, BrazilianAnalyzer::setupBrazilianAnalyzerDeserializer); + + protected static void setupBrazilianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java new file mode 100644 index 000000000..bce4548fe --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/BulgarianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.BulgarianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class BulgarianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private BulgarianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static BulgarianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Bulgarian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "bulgarian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link BulgarianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link BulgarianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public BulgarianAnalyzer build() { + _checkSingleUse(); + + return new BulgarianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link BulgarianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, BulgarianAnalyzer::setupBulgarianAnalyzerDeserializer); + + protected static void setupBulgarianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java new file mode 100644 index 000000000..be3608b7e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CatalanAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CatalanAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CatalanAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private CatalanAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static CatalanAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Catalan; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "catalan"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CatalanAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CatalanAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CatalanAnalyzer build() { + _checkSingleUse(); + + return new CatalanAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CatalanAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CatalanAnalyzer::setupCatalanAnalyzerDeserializer); + + protected static void setupCatalanAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java new file mode 100644 index 000000000..23af63468 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ChineseAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ChineseAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChineseAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private ChineseAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static ChineseAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Chinese; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "chinese"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ChineseAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ChineseAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ChineseAnalyzer build() { + _checkSingleUse(); + + return new ChineseAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ChineseAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ChineseAnalyzer::setupChineseAnalyzerDeserializer); + + protected static void setupChineseAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java new file mode 100644 index 000000000..bf48d0fe7 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CjkAnalyzer.java @@ -0,0 +1,216 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CjkAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CjkAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private CjkAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static CjkAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Cjk; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "cjk"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CjkAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CjkAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CjkAnalyzer build() { + _checkSingleUse(); + + return new CjkAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CjkAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CjkAnalyzer::setupCjkAnalyzerDeserializer); + + protected static void setupCjkAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java new file mode 100644 index 000000000..9f6ba9e73 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/CzechAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.CzechAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CzechAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private CzechAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static CzechAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Czech; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "czech"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CzechAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CzechAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CzechAnalyzer build() { + _checkSingleUse(); + + return new CzechAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CzechAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CzechAnalyzer::setupCzechAnalyzerDeserializer); + + protected static void setupCzechAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java new file mode 100644 index 000000000..c8f6d9137 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DanishAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.DanishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DanishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private DanishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static DanishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Danish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "danish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DanishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DanishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DanishAnalyzer build() { + _checkSingleUse(); + + return new DanishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DanishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + DanishAnalyzer::setupDanishAnalyzerDeserializer); + + protected static void setupDanishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java index 518b1e66a..7148de8c1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/DutchAnalyzer.java @@ -63,11 +63,18 @@ public class DutchAnalyzer implements AnalyzerVariant, JsonpSerializable { private final List stopwords; + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + // --------------------------------------------------------------------------------------------- private DutchAnalyzer(Builder builder) { this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); } @@ -90,6 +97,21 @@ public final List stopwords() { return this.stopwords; } + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + /** * Serialize this object to JSON. */ @@ -113,6 +135,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } } @@ -131,6 +168,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private List stopwords; + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + /** * API name: {@code stopwords} *

@@ -151,6 +194,34 @@ public final Builder stopwords(String value, String... values) { return this; } + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + @Override protected Builder self() { return this; @@ -181,6 +252,9 @@ protected static void setupDutchAnalyzerDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class EnglishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private EnglishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static EnglishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.English; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "english"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link EnglishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link EnglishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public EnglishAnalyzer build() { + _checkSingleUse(); + + return new EnglishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link EnglishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + EnglishAnalyzer::setupEnglishAnalyzerDeserializer); + + protected static void setupEnglishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java new file mode 100644 index 000000000..85227ec6d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/EstonianAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.EstonianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class EstonianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private EstonianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static EstonianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Estonian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "estonian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link EstonianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link EstonianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public EstonianAnalyzer build() { + _checkSingleUse(); + + return new EstonianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link EstonianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + EstonianAnalyzer::setupEstonianAnalyzerDeserializer); + + protected static void setupEstonianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java new file mode 100644 index 000000000..1a5082228 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FinnishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.FinnishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FinnishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private FinnishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static FinnishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Finnish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "finnish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FinnishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FinnishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FinnishAnalyzer build() { + _checkSingleUse(); + + return new FinnishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FinnishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FinnishAnalyzer::setupFinnishAnalyzerDeserializer); + + protected static void setupFinnishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java new file mode 100644 index 000000000..2101cf9bb --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FrenchAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.FrenchAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FrenchAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private FrenchAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static FrenchAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.French; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "french"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FrenchAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FrenchAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FrenchAnalyzer build() { + _checkSingleUse(); + + return new FrenchAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FrenchAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FrenchAnalyzer::setupFrenchAnalyzerDeserializer); + + protected static void setupFrenchAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java new file mode 100644 index 000000000..68444dfb0 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GalicianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GalicianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GalicianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private GalicianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static GalicianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Galician; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "galician"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GalicianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GalicianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GalicianAnalyzer build() { + _checkSingleUse(); + + return new GalicianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GalicianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GalicianAnalyzer::setupGalicianAnalyzerDeserializer); + + protected static void setupGalicianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java new file mode 100644 index 000000000..d55757c1c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GermanAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GermanAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GermanAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private GermanAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static GermanAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.German; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "german"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GermanAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GermanAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GermanAnalyzer build() { + _checkSingleUse(); + + return new GermanAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GermanAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GermanAnalyzer::setupGermanAnalyzerDeserializer); + + protected static void setupGermanAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java new file mode 100644 index 000000000..d6bc8132d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/GreekAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.GreekAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GreekAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private GreekAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static GreekAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Greek; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "greek"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GreekAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GreekAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GreekAnalyzer build() { + _checkSingleUse(); + + return new GreekAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GreekAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GreekAnalyzer::setupGreekAnalyzerDeserializer); + + protected static void setupGreekAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java new file mode 100644 index 000000000..0c0d2ae59 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HindiAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.HindiAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class HindiAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private HindiAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static HindiAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Hindi; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "hindi"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link HindiAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link HindiAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public HindiAnalyzer build() { + _checkSingleUse(); + + return new HindiAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link HindiAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + HindiAnalyzer::setupHindiAnalyzerDeserializer); + + protected static void setupHindiAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java new file mode 100644 index 000000000..bfafdc917 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/HungarianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.HungarianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class HungarianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private HungarianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static HungarianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Hungarian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "hungarian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link HungarianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link HungarianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public HungarianAnalyzer build() { + _checkSingleUse(); + + return new HungarianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link HungarianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, HungarianAnalyzer::setupHungarianAnalyzerDeserializer); + + protected static void setupHungarianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java new file mode 100644 index 000000000..1d8bba61b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IndonesianAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.IndonesianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IndonesianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private IndonesianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static IndonesianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Indonesian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "indonesian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndonesianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IndonesianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndonesianAnalyzer build() { + _checkSingleUse(); + + return new IndonesianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IndonesianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IndonesianAnalyzer::setupIndonesianAnalyzerDeserializer); + + protected static void setupIndonesianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java new file mode 100644 index 000000000..d7305fc8d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IrishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.IrishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IrishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private IrishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static IrishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Irish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "irish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IrishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IrishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IrishAnalyzer build() { + _checkSingleUse(); + + return new IrishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IrishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + IrishAnalyzer::setupIrishAnalyzerDeserializer); + + protected static void setupIrishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java new file mode 100644 index 000000000..c6b1f8aa2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ItalianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ItalianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ItalianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private ItalianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static ItalianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Italian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "italian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ItalianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ItalianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ItalianAnalyzer build() { + _checkSingleUse(); + + return new ItalianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ItalianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ItalianAnalyzer::setupItalianAnalyzerDeserializer); + + protected static void setupItalianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java new file mode 100644 index 000000000..d9704dc34 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LatvianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.LatvianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LatvianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private LatvianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static LatvianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Latvian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "latvian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LatvianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LatvianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LatvianAnalyzer build() { + _checkSingleUse(); + + return new LatvianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LatvianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + LatvianAnalyzer::setupLatvianAnalyzerDeserializer); + + protected static void setupLatvianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java new file mode 100644 index 000000000..945665910 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LithuanianAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.LithuanianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LithuanianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private LithuanianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static LithuanianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Lithuanian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "lithuanian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LithuanianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LithuanianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LithuanianAnalyzer build() { + _checkSingleUse(); + + return new LithuanianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LithuanianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LithuanianAnalyzer::setupLithuanianAnalyzerDeserializer); + + protected static void setupLithuanianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java new file mode 100644 index 000000000..a769cb153 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NorwegianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.NorwegianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class NorwegianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private NorwegianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static NorwegianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Norwegian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "norwegian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NorwegianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link NorwegianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NorwegianAnalyzer build() { + _checkSingleUse(); + + return new NorwegianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NorwegianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, NorwegianAnalyzer::setupNorwegianAnalyzerDeserializer); + + protected static void setupNorwegianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java new file mode 100644 index 000000000..7f6fcfb2f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PersianAnalyzer.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.PersianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PersianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private PersianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static PersianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Persian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "persian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PersianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PersianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PersianAnalyzer build() { + _checkSingleUse(); + + return new PersianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PersianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PersianAnalyzer::setupPersianAnalyzerDeserializer); + + protected static void setupPersianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java index 508311e3c..019fc839c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PhoneticTokenFilter.java @@ -66,11 +66,13 @@ public class PhoneticTokenFilter extends TokenFilterBase implements TokenFilterD @Nullable private final Integer maxCodeLen; + @Nullable private final PhoneticNameType nameType; @Nullable private final Boolean replace; + @Nullable private final PhoneticRuleType ruleType; // --------------------------------------------------------------------------------------------- @@ -79,11 +81,11 @@ private PhoneticTokenFilter(Builder builder) { super(builder); this.encoder = ApiTypeHelper.requireNonNull(builder.encoder, this, "encoder"); - this.languageset = ApiTypeHelper.unmodifiableRequired(builder.languageset, this, "languageset"); + this.languageset = ApiTypeHelper.unmodifiable(builder.languageset); this.maxCodeLen = builder.maxCodeLen; - this.nameType = ApiTypeHelper.requireNonNull(builder.nameType, this, "nameType"); + this.nameType = builder.nameType; this.replace = builder.replace; - this.ruleType = ApiTypeHelper.requireNonNull(builder.ruleType, this, "ruleType"); + this.ruleType = builder.ruleType; } @@ -107,7 +109,7 @@ public final PhoneticEncoder encoder() { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} */ public final List languageset() { return this.languageset; @@ -122,8 +124,9 @@ public final Integer maxCodeLen() { } /** - * Required - API name: {@code name_type} + * API name: {@code name_type} */ + @Nullable public final PhoneticNameType nameType() { return this.nameType; } @@ -137,8 +140,9 @@ public final Boolean replace() { } /** - * Required - API name: {@code rule_type} + * API name: {@code rule_type} */ + @Nullable public final PhoneticRuleType ruleType() { return this.ruleType; } @@ -163,15 +167,19 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.maxCodeLen); } - generator.writeKey("name_type"); - this.nameType.serialize(generator, mapper); + if (this.nameType != null) { + generator.writeKey("name_type"); + this.nameType.serialize(generator, mapper); + } if (this.replace != null) { generator.writeKey("replace"); generator.write(this.replace); } - generator.writeKey("rule_type"); - this.ruleType.serialize(generator, mapper); + if (this.ruleType != null) { + generator.writeKey("rule_type"); + this.ruleType.serialize(generator, mapper); + } } @@ -186,16 +194,19 @@ public static class Builder extends TokenFilterBase.AbstractBuilder ObjectBuilder { private PhoneticEncoder encoder; + @Nullable private List languageset; @Nullable private Integer maxCodeLen; + @Nullable private PhoneticNameType nameType; @Nullable private Boolean replace; + @Nullable private PhoneticRuleType ruleType; /** @@ -207,7 +218,7 @@ public final Builder encoder(PhoneticEncoder value) { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} *

* Adds all elements of list to languageset. */ @@ -217,7 +228,7 @@ public final Builder languageset(List list) { } /** - * Required - API name: {@code languageset} + * API name: {@code languageset} *

* Adds one or more values to languageset. */ @@ -235,9 +246,9 @@ public final Builder maxCodeLen(@Nullable Integer value) { } /** - * Required - API name: {@code name_type} + * API name: {@code name_type} */ - public final Builder nameType(PhoneticNameType value) { + public final Builder nameType(@Nullable PhoneticNameType value) { this.nameType = value; return this; } @@ -251,9 +262,9 @@ public final Builder replace(@Nullable Boolean value) { } /** - * Required - API name: {@code rule_type} + * API name: {@code rule_type} */ - public final Builder ruleType(PhoneticRuleType value) { + public final Builder ruleType(@Nullable PhoneticRuleType value) { this.ruleType = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java new file mode 100644 index 000000000..27c85d66a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/PortugueseAnalyzer.java @@ -0,0 +1,264 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.PortugueseAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PortugueseAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private PortugueseAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static PortugueseAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Portuguese; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "portuguese"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PortugueseAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PortugueseAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PortugueseAnalyzer build() { + _checkSingleUse(); + + return new PortugueseAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PortugueseAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, PortugueseAnalyzer::setupPortugueseAnalyzerDeserializer); + + protected static void setupPortugueseAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java new file mode 100644 index 000000000..84a074457 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RomanianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.RomanianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RomanianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private RomanianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static RomanianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Romanian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "romanian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RomanianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RomanianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RomanianAnalyzer build() { + _checkSingleUse(); + + return new RomanianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RomanianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RomanianAnalyzer::setupRomanianAnalyzerDeserializer); + + protected static void setupRomanianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java new file mode 100644 index 000000000..5e872ec82 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/RussianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.RussianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RussianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private RussianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static RussianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Russian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "russian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RussianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RussianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RussianAnalyzer build() { + _checkSingleUse(); + + return new RussianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RussianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RussianAnalyzer::setupRussianAnalyzerDeserializer); + + protected static void setupRussianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java new file mode 100644 index 000000000..42012a3a5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SerbianAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SerbianAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SerbianAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SerbianAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SerbianAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Serbian; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "serbian"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SerbianAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SerbianAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SerbianAnalyzer build() { + _checkSingleUse(); + + return new SerbianAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SerbianAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SerbianAnalyzer::setupSerbianAnalyzerDeserializer); + + protected static void setupSerbianAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java new file mode 100644 index 000000000..a56c6f581 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SoraniAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SoraniAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SoraniAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SoraniAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SoraniAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Sorani; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "sorani"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SoraniAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SoraniAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SoraniAnalyzer build() { + _checkSingleUse(); + + return new SoraniAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SoraniAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SoraniAnalyzer::setupSoraniAnalyzerDeserializer); + + protected static void setupSoraniAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java new file mode 100644 index 000000000..aa3db52d6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SpanishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SpanishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SpanishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SpanishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SpanishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Spanish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "spanish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SpanishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SpanishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SpanishAnalyzer build() { + _checkSingleUse(); + + return new SpanishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SpanishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SpanishAnalyzer::setupSpanishAnalyzerDeserializer); + + protected static void setupSpanishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java new file mode 100644 index 000000000..230c906ae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SwedishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.SwedishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SwedishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private SwedishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static SwedishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Swedish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "swedish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SwedishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SwedishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SwedishAnalyzer build() { + _checkSingleUse(); + + return new SwedishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SwedishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SwedishAnalyzer::setupSwedishAnalyzerDeserializer); + + protected static void setupSwedishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java new file mode 100644 index 000000000..429fa14aa --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/ThaiAnalyzer.java @@ -0,0 +1,216 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.ThaiAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ThaiAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + // --------------------------------------------------------------------------------------------- + + private ThaiAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + + } + + public static ThaiAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Thai; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "thai"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ThaiAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ThaiAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ThaiAnalyzer build() { + _checkSingleUse(); + + return new ThaiAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ThaiAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ThaiAnalyzer::setupThaiAnalyzerDeserializer); + + protected static void setupThaiAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java new file mode 100644 index 000000000..64b0832ad --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/TurkishAnalyzer.java @@ -0,0 +1,262 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.analysis; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.analysis.TurkishAnalyzer + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TurkishAnalyzer implements AnalyzerVariant, JsonpSerializable { + private final List stopwords; + + @Nullable + private final String stopwordsPath; + + private final List stemExclusion; + + // --------------------------------------------------------------------------------------------- + + private TurkishAnalyzer(Builder builder) { + + this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords); + this.stopwordsPath = builder.stopwordsPath; + this.stemExclusion = ApiTypeHelper.unmodifiable(builder.stemExclusion); + + } + + public static TurkishAnalyzer of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Analyzer variant kind. + */ + @Override + public Analyzer.Kind _analyzerKind() { + return Analyzer.Kind.Turkish; + } + + /** + * API name: {@code stopwords} + */ + public final List stopwords() { + return this.stopwords; + } + + /** + * API name: {@code stopwords_path} + */ + @Nullable + public final String stopwordsPath() { + return this.stopwordsPath; + } + + /** + * API name: {@code stem_exclusion} + */ + public final List stemExclusion() { + return this.stemExclusion; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "turkish"); + + if (ApiTypeHelper.isDefined(this.stopwords)) { + generator.writeKey("stopwords"); + generator.writeStartArray(); + for (String item0 : this.stopwords) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.stopwordsPath != null) { + generator.writeKey("stopwords_path"); + generator.write(this.stopwordsPath); + + } + if (ApiTypeHelper.isDefined(this.stemExclusion)) { + generator.writeKey("stem_exclusion"); + generator.writeStartArray(); + for (String item0 : this.stemExclusion) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TurkishAnalyzer}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List stopwords; + + @Nullable + private String stopwordsPath; + + @Nullable + private List stemExclusion; + + /** + * API name: {@code stopwords} + *

+ * Adds all elements of list to stopwords. + */ + public final Builder stopwords(List list) { + this.stopwords = _listAddAll(this.stopwords, list); + return this; + } + + /** + * API name: {@code stopwords} + *

+ * Adds one or more values to stopwords. + */ + public final Builder stopwords(String value, String... values) { + this.stopwords = _listAdd(this.stopwords, value, values); + return this; + } + + /** + * API name: {@code stopwords_path} + */ + public final Builder stopwordsPath(@Nullable String value) { + this.stopwordsPath = value; + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds all elements of list to stemExclusion. + */ + public final Builder stemExclusion(List list) { + this.stemExclusion = _listAddAll(this.stemExclusion, list); + return this; + } + + /** + * API name: {@code stem_exclusion} + *

+ * Adds one or more values to stemExclusion. + */ + public final Builder stemExclusion(String value, String... values) { + this.stemExclusion = _listAdd(this.stemExclusion, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TurkishAnalyzer}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TurkishAnalyzer build() { + _checkSingleUse(); + + return new TurkishAnalyzer(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TurkishAnalyzer} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TurkishAnalyzer::setupTurkishAnalyzerDeserializer); + + protected static void setupTurkishAnalyzerDeserializer(ObjectDeserializer op) { + + op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stopwords"); + op.add(Builder::stopwordsPath, JsonpDeserializer.stringDeserializer(), "stopwords_path"); + op.add(Builder::stemExclusion, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "stem_exclusion"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java index b25057df5..c655332e0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Float; import java.lang.Integer; import java.lang.String; import java.util.Objects; @@ -63,17 +64,23 @@ public class DenseVectorIndexOptions implements JsonpSerializable { private final String type; - private final int m; + @Nullable + private final Integer m; - private final int efConstruction; + @Nullable + private final Integer efConstruction; + + @Nullable + private final Float confidenceInterval; // --------------------------------------------------------------------------------------------- private DenseVectorIndexOptions(Builder builder) { this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); - this.m = ApiTypeHelper.requireNonNull(builder.m, this, "m"); - this.efConstruction = ApiTypeHelper.requireNonNull(builder.efConstruction, this, "efConstruction"); + this.m = builder.m; + this.efConstruction = builder.efConstruction; + this.confidenceInterval = builder.confidenceInterval; } @@ -89,19 +96,29 @@ public final String type() { } /** - * Required - API name: {@code m} + * API name: {@code m} */ - public final int m() { + @Nullable + public final Integer m() { return this.m; } /** - * Required - API name: {@code ef_construction} + * API name: {@code ef_construction} */ - public final int efConstruction() { + @Nullable + public final Integer efConstruction() { return this.efConstruction; } + /** + * API name: {@code confidence_interval} + */ + @Nullable + public final Float confidenceInterval() { + return this.confidenceInterval; + } + /** * Serialize this object to JSON. */ @@ -116,11 +133,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("type"); generator.write(this.type); - generator.writeKey("m"); - generator.write(this.m); + if (this.m != null) { + generator.writeKey("m"); + generator.write(this.m); + + } + if (this.efConstruction != null) { + generator.writeKey("ef_construction"); + generator.write(this.efConstruction); + + } + if (this.confidenceInterval != null) { + generator.writeKey("confidence_interval"); + generator.write(this.confidenceInterval); - generator.writeKey("ef_construction"); - generator.write(this.efConstruction); + } } @@ -140,10 +167,15 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private String type; + @Nullable private Integer m; + @Nullable private Integer efConstruction; + @Nullable + private Float confidenceInterval; + /** * Required - API name: {@code type} */ @@ -153,21 +185,29 @@ public final Builder type(String value) { } /** - * Required - API name: {@code m} + * API name: {@code m} */ - public final Builder m(int value) { + public final Builder m(@Nullable Integer value) { this.m = value; return this; } /** - * Required - API name: {@code ef_construction} + * API name: {@code ef_construction} */ - public final Builder efConstruction(int value) { + public final Builder efConstruction(@Nullable Integer value) { this.efConstruction = value; return this; } + /** + * API name: {@code confidence_interval} + */ + public final Builder confidenceInterval(@Nullable Float value) { + this.confidenceInterval = value; + return this; + } + @Override protected Builder self() { return this; @@ -200,6 +240,7 @@ protected static void setupDenseVectorIndexOptionsDeserializer( op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); op.add(Builder::m, JsonpDeserializer.integerDeserializer(), "m"); op.add(Builder::efConstruction, JsonpDeserializer.integerDeserializer(), "ef_construction"); + op.add(Builder::confidenceInterval, JsonpDeserializer.floatDeserializer(), "confidence_interval"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java index 2b44695d2..28bf08111 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/DateRangeQuery.java @@ -24,6 +24,7 @@ import co.elastic.clients.json.JsonpMapper; 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 jakarta.json.stream.JsonGenerator; import java.lang.String; @@ -56,6 +57,9 @@ */ @JsonpDeserializable public class DateRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + @Nullable private final String format; @@ -66,6 +70,7 @@ public class DateRangeQuery extends RangeQueryBase implements RangeQuery private DateRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.format = builder.format; this.timeZone = builder.timeZone; @@ -84,6 +89,13 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Date; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + /** * Date format used to convert date values in the query. *

@@ -106,6 +118,7 @@ public final String timeZone() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.format != null) { @@ -119,6 +132,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + generator.writeEnd(); + } // --------------------------------------------------------------------------------------------- @@ -130,6 +145,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Nullable private String format; @@ -189,6 +214,8 @@ protected static void setupDateRangeQueryDeserializer(ObjectDeserializer implements RangeQueryVariant { + // Single key dictionary + private final String field; + // --------------------------------------------------------------------------------------------- private NumberRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); } @@ -73,6 +81,22 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Number; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + // --------------------------------------------------------------------------------------------- /** @@ -82,6 +106,16 @@ public RangeQuery.Kind _rangeQueryKind() { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Override protected Builder self() { return this; @@ -112,6 +146,8 @@ public NumberRangeQuery build() { protected static void setupNumberRangeQueryDeserializer(ObjectDeserializer op) { RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.doubleDeserializer()); + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java index 738b22398..e0625e335 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBase.java @@ -26,11 +26,9 @@ import co.elastic.clients.json.JsonpUtils; 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.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.String; import java.util.Objects; import javax.annotation.Nullable; @@ -59,9 +57,6 @@ */ public abstract class RangeQueryBase extends QueryBase { - // Single key dictionary - private final String field; - @Nullable private final RangeRelation relation; @@ -90,7 +85,6 @@ public abstract class RangeQueryBase extends QueryBase { protected RangeQueryBase(AbstractBuilder builder) { super(builder); - this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.relation = builder.relation; this.gt = builder.gt; @@ -103,13 +97,6 @@ protected RangeQueryBase(AbstractBuilder builder) { } - /** - * Required - the required field - */ - public final String field() { - return this.field; - } - /** * Indicates how the range query matches values for range fields. *

@@ -177,7 +164,6 @@ public final T to() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.relation != null) { @@ -215,23 +201,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } - generator.writeEnd(); - } public abstract static class AbstractBuilder> extends QueryBase.AbstractBuilder { - private String field; - - /** - * Required - the required field - */ - public final BuilderT field(String value) { - this.field = value; - return self(); - } - @Nullable private RangeRelation relation; @@ -345,8 +319,6 @@ protected static > void setupRa op.add(AbstractBuilder::from, tDeserializer, "from"); op.add(AbstractBuilder::to, tDeserializer, "to"); - op.setKey(AbstractBuilder::field, JsonpDeserializer.stringDeserializer()); - } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java index 1f69488c1..d2399c98a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/TermQuery.java @@ -269,7 +269,7 @@ protected static void setupTermQueryDeserializer(ObjectDeserializer implements RangeQueryVariant { + // Single key dictionary + private final String field; + // --------------------------------------------------------------------------------------------- private TermRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); } @@ -73,6 +80,22 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Term; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + // --------------------------------------------------------------------------------------------- /** @@ -82,6 +105,16 @@ public RangeQuery.Kind _rangeQueryKind() { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Override protected Builder self() { return this; @@ -112,6 +145,8 @@ public TermRangeQuery build() { protected static void setupTermRangeQueryDeserializer(ObjectDeserializer op) { RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.stringDeserializer()); + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + } } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java index 69d216052..abdfb9ba8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/UntypedRangeQuery.java @@ -25,6 +25,7 @@ import co.elastic.clients.json.JsonpMapper; 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 jakarta.json.stream.JsonGenerator; import java.lang.String; @@ -57,6 +58,9 @@ */ @JsonpDeserializable public class UntypedRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + @Nullable private final String format; @@ -67,6 +71,7 @@ public class UntypedRangeQuery extends RangeQueryBase implements Range private UntypedRangeQuery(Builder builder) { super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); this.format = builder.format; this.timeZone = builder.timeZone; @@ -85,6 +90,13 @@ public RangeQuery.Kind _rangeQueryKind() { return RangeQuery.Kind.Untyped; } + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + /** * Date format used to convert date values in the query. *

@@ -107,6 +119,7 @@ public final String timeZone() { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); super.serializeInternal(generator, mapper); if (this.format != null) { @@ -120,6 +133,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } + generator.writeEnd(); + } // --------------------------------------------------------------------------------------------- @@ -131,6 +146,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RangeQueryBase.AbstractBuilder implements ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + @Nullable private String format; @@ -190,6 +215,8 @@ protected static void setupUntypedRangeQueryDeserializer(ObjectDeserializer + * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java index 4ef3071fb..631a94d7c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java @@ -53,12 +53,13 @@ // typedef: cat.component_templates.Request /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java index 52bf74d58..a1d6203c5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java @@ -56,11 +56,13 @@ // typedef: cat.count.Request /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java index 3fe1491ca..19f082cd7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java @@ -67,11 +67,12 @@ public ElasticsearchCatAsyncClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: cat.aliases /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -86,11 +87,12 @@ public CompletableFuture aliases(AliasesRequest request) { } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @param fn * a function that initializes a builder to create the @@ -106,11 +108,12 @@ public final CompletableFuture aliases( } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -125,12 +128,13 @@ public CompletableFuture aliases() { // ----- Endpoint: cat.component_templates /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -145,12 +149,13 @@ public CompletableFuture componentTemplates(Componen } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @param fn * a function that initializes a builder to create the @@ -166,12 +171,13 @@ public final CompletableFuture componentTemplates( } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -186,11 +192,13 @@ public CompletableFuture componentTemplates() { // ----- Endpoint: cat.count /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see count(CountRequest request) { } /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @param fn @@ -227,11 +237,13 @@ public final CompletableFuture count( } /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see count() { // ----- Endpoint: cat.help /** - * Returns help for the Cat APIs. + * Get CAT help. Returns help for the CAT APIs. * * @see Documentation @@ -260,17 +272,27 @@ public CompletableFuture help() { // ----- Endpoint: cat.indices /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -285,17 +307,27 @@ public CompletableFuture indices(IndicesRequest request) { } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @param fn * a function that initializes a builder to create the @@ -311,17 +343,27 @@ public final CompletableFuture indices( } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -336,12 +378,12 @@ public CompletableFuture indices() { // ----- Endpoint: cat.ml_data_frame_analytics /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -356,12 +398,12 @@ public CompletableFuture mlDataFrameAnalytics(MlDa } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @param fn * a function that initializes a builder to create the @@ -377,12 +419,12 @@ public final CompletableFuture mlDataFrameAnalytic } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -397,15 +439,15 @@ public CompletableFuture mlDataFrameAnalytics() { // ----- Endpoint: cat.ml_datafeeds /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -420,15 +462,15 @@ public CompletableFuture mlDatafeeds(MlDatafeedsRequest req } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @param fn * a function that initializes a builder to create the @@ -444,15 +486,15 @@ public final CompletableFuture mlDatafeeds( } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -467,15 +509,15 @@ public CompletableFuture mlDatafeeds() { // ----- Endpoint: cat.ml_jobs /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -490,15 +532,15 @@ public CompletableFuture mlJobs(MlJobsRequest request) { } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @param fn * a function that initializes a builder to create the @@ -514,15 +556,15 @@ public final CompletableFuture mlJobs( } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -537,11 +579,12 @@ public CompletableFuture mlJobs() { // ----- Endpoint: cat.ml_trained_models /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -556,11 +599,12 @@ public CompletableFuture mlTrainedModels(MlTrainedModel } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @param fn * a function that initializes a builder to create the @@ -576,11 +620,12 @@ public final CompletableFuture mlTrainedModels( } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -595,11 +640,11 @@ public CompletableFuture mlTrainedModels() { // ----- Endpoint: cat.transforms /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation @@ -614,11 +659,11 @@ public CompletableFuture transforms(TransformsRequest reques } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @param fn * a function that initializes a builder to create the @@ -634,11 +679,11 @@ public final CompletableFuture transforms( } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java index 9483c56ee..112ac3c0f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java @@ -68,11 +68,12 @@ public ElasticsearchCatClient withTransportOptions(@Nullable TransportOptions tr // ----- Endpoint: cat.aliases /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -87,11 +88,12 @@ public AliasesResponse aliases(AliasesRequest request) throws IOException, Elast } /** - * Retrieves the cluster’s index aliases, including filter and routing - * information. The API does not return data stream aliases. IMPORTANT: cat APIs - * are only intended for human consumption using the command line or the Kibana - * console. They are not intended for use by applications. For application - * consumption, use the aliases API. + * Get aliases. Retrieves the cluster’s index aliases, including filter and + * routing information. The API does not return data stream aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @param fn * a function that initializes a builder to create the @@ -107,11 +109,12 @@ public final AliasesResponse aliases(Function + * CAT APIs are only intended for human consumption using the command line or + * the Kibana console. They are not intended for use by applications. For + * application consumption, use the aliases API. * * @see Documentation @@ -126,12 +129,13 @@ public AliasesResponse aliases() throws IOException, ElasticsearchException { // ----- Endpoint: cat.component_templates /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -147,12 +151,13 @@ public ComponentTemplatesResponse componentTemplates(ComponentTemplatesRequest r } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @param fn * a function that initializes a builder to create the @@ -169,12 +174,13 @@ public final ComponentTemplatesResponse componentTemplates( } /** - * Returns information about component templates in a cluster. Component - * templates are building blocks for constructing index templates that specify - * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended - * for human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the get - * component template API. + * Get component templates. Returns information about component templates in a + * cluster. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the get component template API. * * @see Documentation @@ -189,11 +195,13 @@ public ComponentTemplatesResponse componentTemplates() throws IOException, Elast // ----- Endpoint: cat.count /** - * Provides quick access to a document count for a data stream, an index, or an - * entire cluster. NOTE: The document count only includes live documents, not - * deleted documents which have not yet been removed by the merge process. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For + * Get a document count. Provides quick access to a document count for a data + * stream, an index, or an entire cluster. The document count only includes live + * documents, not deleted documents which have not yet been removed by the merge + * process. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see + * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @param fn @@ -230,11 +240,13 @@ public final CountResponse count(Function + * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For * application consumption, use the count API. * * @see Documentation @@ -263,17 +275,27 @@ public HelpResponse help() throws IOException, ElasticsearchException { // ----- Endpoint: cat.indices /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -288,17 +310,27 @@ public IndicesResponse indices(IndicesRequest request) throws IOException, Elast } /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @param fn * a function that initializes a builder to create the @@ -314,17 +346,27 @@ public final IndicesResponse indices(Function

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see Documentation @@ -339,12 +381,12 @@ public IndicesResponse indices() throws IOException, ElasticsearchException { // ----- Endpoint: cat.ml_data_frame_analytics /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -360,12 +402,12 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics(MlDataFrameAnalyticsReq } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @param fn * a function that initializes a builder to create the @@ -382,12 +424,12 @@ public final MlDataFrameAnalyticsResponse mlDataFrameAnalytics( } /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see Documentation @@ -402,15 +444,15 @@ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics() throws IOException, E // ----- Endpoint: cat.ml_datafeeds /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -425,15 +467,15 @@ public MlDatafeedsResponse mlDatafeeds(MlDatafeedsRequest request) throws IOExce } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @param fn * a function that initializes a builder to create the @@ -450,15 +492,15 @@ public final MlDatafeedsResponse mlDatafeeds( } /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see Documentation @@ -473,15 +515,15 @@ public MlDatafeedsResponse mlDatafeeds() throws IOException, ElasticsearchExcept // ----- Endpoint: cat.ml_jobs /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -496,15 +538,15 @@ public MlJobsResponse mlJobs(MlJobsRequest request) throws IOException, Elastics } /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @param fn * a function that initializes a builder to create the @@ -520,15 +562,15 @@ public final MlJobsResponse mlJobs(Functionmonitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. - *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. + *

+ * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see Documentation @@ -543,11 +585,12 @@ public MlJobsResponse mlJobs() throws IOException, ElasticsearchException { // ----- Endpoint: cat.ml_trained_models /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -563,11 +606,12 @@ public MlTrainedModelsResponse mlTrainedModels(MlTrainedModelsRequest request) } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @param fn * a function that initializes a builder to create the @@ -584,11 +628,12 @@ public final MlTrainedModelsResponse mlTrainedModels( } /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see Documentation @@ -603,11 +648,11 @@ public MlTrainedModelsResponse mlTrainedModels() throws IOException, Elasticsear // ----- Endpoint: cat.transforms /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation @@ -622,11 +667,11 @@ public TransformsResponse transforms(TransformsRequest request) throws IOExcepti } /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @param fn * a function that initializes a builder to create the @@ -642,11 +687,11 @@ public final TransformsResponse transforms(Function - * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java index 31ba6cd91..92567555f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/HelpRequest.java @@ -51,7 +51,7 @@ // typedef: cat.help.Request /** - * Returns help for the Cat APIs. + * Get CAT help. Returns help for the CAT APIs. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java index d6850e2cc..af07f14e5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java @@ -61,17 +61,27 @@ // typedef: cat.indices.Request /** - * Returns high-level information about indices in a cluster, including backing - * indices for data streams. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the get index API. - * Use the cat indices API to get the following information for each index in a - * cluster: shard count; document count; deleted document count; primary store - * size; total store size of all shards, including shard replicas. These metrics - * are retrieved directly from Lucene, which Elasticsearch uses internally to - * power indexing and search. As a result, all document counts include hidden - * nested documents. To get an accurate count of Elasticsearch documents, use - * the cat count or count APIs. + * Get index information. Returns high-level information about indices in a + * cluster, including backing indices for data streams. + *

+ * Use this request to get the following information for each index in a + * cluster: + *

+ *

+ * These metrics are retrieved directly from Lucene, which Elasticsearch uses + * internally to power indexing and search. As a result, all document counts + * include hidden nested documents. To get an accurate count of Elasticsearch + * documents, use the cat count or count APIs. + *

+ * CAT APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use an index endpoint. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java index dd8b956b4..c257917f4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java @@ -59,12 +59,12 @@ // typedef: cat.ml_data_frame_analytics.Request /** - * Returns configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs. Returns configuration and usage information + * about data frame analytics jobs. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get data frame analytics jobs statistics - * API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get data frame analytics jobs statistics API. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java index 965c5f017..c8972a2aa 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java @@ -58,15 +58,15 @@ // typedef: cat.ml_datafeeds.Request /** - * Returns configuration and usage information about datafeeds. This API returns - * a maximum of 10,000 datafeeds. If the Elasticsearch security features are - * enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. + * Get datafeeds. Returns configuration and usage information about datafeeds. + * This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security + * features are enabled, you must have monitor_ml, + * monitor, manage_ml, or manage cluster + * privileges to use this API. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get datafeed statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get datafeed statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java index 9060217ce..d217feb63 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java @@ -59,15 +59,15 @@ // typedef: cat.ml_jobs.Request /** - * Returns configuration and usage information for anomaly detection jobs. This - * API returns a maximum of 10,000 jobs. If the Elasticsearch security features - * are enabled, you must have monitor_ml, monitor, - * manage_ml, or manage cluster privileges to use this - * API. + * Get anomaly detection jobs. Returns configuration and usage information for + * anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the + * Elasticsearch security features are enabled, you must have + * monitor_ml, monitor, manage_ml, or + * manage cluster privileges to use this API. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get anomaly detection job statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get anomaly detection job statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java index c6979c9e6..fe3bc8011 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java @@ -59,11 +59,12 @@ // typedef: cat.ml_trained_models.Request /** - * Returns configuration and usage information about inference trained models. + * Get trained models. Returns configuration and usage information about + * inference trained models. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get trained models statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get trained models statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java index 57f5590ae..095b25d87 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java @@ -59,11 +59,11 @@ // typedef: cat.transforms.Request /** - * Returns configuration and usage information about transforms. + * Get transforms. Returns configuration and usage information about transforms. *

- * IMPORTANT: cat APIs are only intended for human consumption using the Kibana - * console or command line. They are not intended for use by applications. For - * application consumption, use the get transform statistics API. + * CAT APIs are only intended for human consumption using the Kibana console or + * command line. They are not intended for use by applications. For application + * consumption, use the get transform statistics API. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java index 99dcfaebb..e0cbc76f9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ClusterInfoRequest.java @@ -58,7 +58,7 @@ // typedef: cluster.info.Request /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java index d20f0ab39..f4a533d34 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/DeleteComponentTemplateRequest.java @@ -58,9 +58,9 @@ // typedef: cluster.delete_component_template.Request /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java index b0f39a2b1..a6eba94af 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterAsyncClient.java @@ -71,9 +71,9 @@ public ElasticsearchClusterAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: cluster.delete_component_template /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see Documentation @@ -89,9 +89,9 @@ public CompletableFuture deleteComponentTemplat } /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -109,7 +109,8 @@ public final CompletableFuture deleteComponentT // ----- Endpoint: cluster.exists_component_template /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see Documentation @@ -124,7 +125,8 @@ public CompletableFuture existsComponentTemplate(ExistsComponen } /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @param fn * a function that initializes a builder to create the @@ -142,7 +144,7 @@ public final CompletableFuture existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -157,7 +159,7 @@ public CompletableFuture getComponentTemplate(GetC } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @param fn * a function that initializes a builder to create the @@ -173,7 +175,7 @@ public final CompletableFuture getComponentTemplat } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -188,7 +190,7 @@ public CompletableFuture getComponentTemplate() { // ----- Endpoint: cluster.info /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -203,7 +205,7 @@ public CompletableFuture info(ClusterInfoRequest request) { } /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -221,9 +223,9 @@ public final CompletableFuture info( // ----- Endpoint: cluster.put_component_template /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -256,9 +258,9 @@ public CompletableFuture putComponentTemplate(PutC } /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java index 5fb7be1cf..9b1e8b9e1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ElasticsearchClusterClient.java @@ -69,9 +69,9 @@ public ElasticsearchClusterClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: cluster.delete_component_template /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @see Documentation @@ -87,9 +87,9 @@ public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTe } /** - * Deletes component templates. Component templates are building blocks for - * constructing index templates that specify index mappings, settings, and - * aliases. + * Delete component templates. Deletes component templates. Component templates + * are building blocks for constructing index templates that specify index + * mappings, settings, and aliases. * * @param fn * a function that initializes a builder to create the @@ -108,7 +108,8 @@ public final DeleteComponentTemplateResponse deleteComponentTemplate( // ----- Endpoint: cluster.exists_component_template /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see Documentation @@ -124,7 +125,8 @@ public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest re } /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @param fn * a function that initializes a builder to create the @@ -143,7 +145,7 @@ public final BooleanResponse existsComponentTemplate( // ----- Endpoint: cluster.get_component_template /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -159,7 +161,7 @@ public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateReq } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @param fn * a function that initializes a builder to create the @@ -176,7 +178,7 @@ public final GetComponentTemplateResponse getComponentTemplate( } /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see Documentation @@ -191,7 +193,7 @@ public GetComponentTemplateResponse getComponentTemplate() throws IOException, E // ----- Endpoint: cluster.info /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see Documentation @@ -206,7 +208,7 @@ public ClusterInfoResponse info(ClusterInfoRequest request) throws IOException, } /** - * Returns different information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @param fn * a function that initializes a builder to create the @@ -224,9 +226,9 @@ public final ClusterInfoResponse info(Function * An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -260,9 +262,9 @@ public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateReq } /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java index 9e885e25e..a30c582f5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/ExistsComponentTemplateRequest.java @@ -61,7 +61,8 @@ // typedef: cluster.exists_component_template.Request /** - * Returns information about whether a particular component template exist + * Check component templates. Returns information about whether a particular + * component template exists. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java index a79f91f32..e4079755c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/GetComponentTemplateRequest.java @@ -56,7 +56,7 @@ // typedef: cluster.get_component_template.Request /** - * Retrieves information about component templates. + * Get component templates. Retrieves information about component templates. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java index 1e28d7a92..82983238e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/cluster/PutComponentTemplateRequest.java @@ -62,9 +62,9 @@ // typedef: cluster.put_component_template.Request /** - * Creates or updates a component template. Component templates are building - * blocks for constructing index templates that specify index mappings, - * settings, and aliases. + * Create or update a component template. Creates or updates a component + * template. Component templates are building blocks for constructing index + * templates that specify index mappings, settings, and aliases. *

* An index template can be composed of multiple component templates. To use a * component template, specify it in an index template’s @@ -175,8 +175,15 @@ public final Time masterTimeout() { /** * Required - Name of the component template to create. Elasticsearch includes * the following built-in component templates: logs-mappings; - * 'logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabledtofalse` - * using the cluster update settings API. + * logs-settings; metrics-mappings; + * metrics-settings;synthetics-mapping; + * synthetics-settings. Elastic Agent uses these templates to + * configure backing indices for its data streams. If you use Elastic Agent and + * want to overwrite one of these templates, set the version for + * your replacement template higher than the current version. If you don’t use + * Elastic Agent and want to disable all built-in component and index templates, + * set stack.templates.enabled to false using the + * cluster update settings API. *

* API name: {@code name} */ @@ -349,8 +356,15 @@ public final Builder masterTimeout(Function> f /** * Required - Name of the component template to create. Elasticsearch includes * the following built-in component templates: logs-mappings; - * 'logs-settings; metrics-mappings; metrics-settings;synthetics-mapping; synthetics-settings. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the versionfor your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabledtofalse` - * using the cluster update settings API. + * logs-settings; metrics-mappings; + * metrics-settings;synthetics-mapping; + * synthetics-settings. Elastic Agent uses these templates to + * configure backing indices for its data streams. If you use Elastic Agent and + * want to overwrite one of these templates, set the version for + * your replacement template higher than the current version. If you don’t use + * Elastic Agent and want to disable all built-in component and index templates, + * set stack.templates.enabled to false using the + * cluster update settings API. *

* API name: {@code name} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java new file mode 100644 index 000000000..fc5fa4085 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java @@ -0,0 +1,181 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.check_in.Request + +/** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see API + * specification + */ + +public class CheckInRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private CheckInRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static CheckInRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be checked in + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CheckInRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector to be checked in + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CheckInRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CheckInRequest build() { + _checkSingleUse(); + + return new CheckInRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.check_in}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.check_in", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_check_in"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, CheckInResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java new file mode 100644 index 000000000..a3ce1a027 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInResponse.java @@ -0,0 +1,153 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.check_in.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CheckInResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private CheckInResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static CheckInResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CheckInResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CheckInResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CheckInResponse build() { + _checkSingleUse(); + + return new CheckInResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CheckInResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CheckInResponse::setupCheckInResponseDeserializer); + + protected static void setupCheckInResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java new file mode 100644 index 000000000..e33d13fa0 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Connector.java @@ -0,0 +1,1089 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Connector + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Connector implements JsonpSerializable { + @Nullable + private final String apiKeyId; + + @Nullable + private final String apiKeySecretId; + + private final Map configuration; + + private final Map customScheduling; + + @Nullable + private final String description; + + @Nullable + private final String error; + + @Nullable + private final ConnectorFeatures features; + + private final List filtering; + + @Nullable + private final String id; + + @Nullable + private final String indexName; + + private final boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String lastAccessControlSyncError; + + @Nullable + private final DateTime lastAccessControlSyncScheduledAt; + + @Nullable + private final SyncStatus lastAccessControlSyncStatus; + + @Nullable + private final Long lastDeletedDocumentCount; + + @Nullable + private final DateTime lastIncrementalSyncScheduledAt; + + @Nullable + private final Long lastIndexedDocumentCount; + + @Nullable + private final DateTime lastSeen; + + @Nullable + private final String lastSyncError; + + @Nullable + private final DateTime lastSyncScheduledAt; + + @Nullable + private final SyncStatus lastSyncStatus; + + @Nullable + private final DateTime lastSynced; + + @Nullable + private final String name; + + @Nullable + private final IngestPipelineParams pipeline; + + private final SchedulingConfiguration scheduling; + + @Nullable + private final String serviceType; + + private final ConnectorStatus status; + + @Nullable + private final JsonData syncCursor; + + private final boolean syncNow; + + // --------------------------------------------------------------------------------------------- + + protected Connector(AbstractBuilder builder) { + + this.apiKeyId = builder.apiKeyId; + this.apiKeySecretId = builder.apiKeySecretId; + this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); + this.customScheduling = ApiTypeHelper.unmodifiableRequired(builder.customScheduling, this, "customScheduling"); + this.description = builder.description; + this.error = builder.error; + this.features = builder.features; + this.filtering = ApiTypeHelper.unmodifiableRequired(builder.filtering, this, "filtering"); + this.id = builder.id; + this.indexName = builder.indexName; + this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); + this.language = builder.language; + this.lastAccessControlSyncError = builder.lastAccessControlSyncError; + this.lastAccessControlSyncScheduledAt = builder.lastAccessControlSyncScheduledAt; + this.lastAccessControlSyncStatus = builder.lastAccessControlSyncStatus; + this.lastDeletedDocumentCount = builder.lastDeletedDocumentCount; + this.lastIncrementalSyncScheduledAt = builder.lastIncrementalSyncScheduledAt; + this.lastIndexedDocumentCount = builder.lastIndexedDocumentCount; + this.lastSeen = builder.lastSeen; + this.lastSyncError = builder.lastSyncError; + this.lastSyncScheduledAt = builder.lastSyncScheduledAt; + this.lastSyncStatus = builder.lastSyncStatus; + this.lastSynced = builder.lastSynced; + this.name = builder.name; + this.pipeline = builder.pipeline; + this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); + this.serviceType = builder.serviceType; + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.syncCursor = builder.syncCursor; + this.syncNow = ApiTypeHelper.requireNonNull(builder.syncNow, this, "syncNow"); + + } + + public static Connector connectorOf(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code api_key_id} + */ + @Nullable + public final String apiKeyId() { + return this.apiKeyId; + } + + /** + * API name: {@code api_key_secret_id} + */ + @Nullable + public final String apiKeySecretId() { + return this.apiKeySecretId; + } + + /** + * Required - API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - API name: {@code custom_scheduling} + */ + public final Map customScheduling() { + return this.customScheduling; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code error} + */ + @Nullable + public final String error() { + return this.error; + } + + /** + * API name: {@code features} + */ + @Nullable + public final ConnectorFeatures features() { + return this.features; + } + + /** + * Required - API name: {@code filtering} + */ + public final List filtering() { + return this.filtering; + } + + /** + * API name: {@code id} + */ + @Nullable + public final String id() { + return this.id; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * Required - API name: {@code is_native} + */ + public final boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code last_access_control_sync_error} + */ + @Nullable + public final String lastAccessControlSyncError() { + return this.lastAccessControlSyncError; + } + + /** + * API name: {@code last_access_control_sync_scheduled_at} + */ + @Nullable + public final DateTime lastAccessControlSyncScheduledAt() { + return this.lastAccessControlSyncScheduledAt; + } + + /** + * API name: {@code last_access_control_sync_status} + */ + @Nullable + public final SyncStatus lastAccessControlSyncStatus() { + return this.lastAccessControlSyncStatus; + } + + /** + * API name: {@code last_deleted_document_count} + */ + @Nullable + public final Long lastDeletedDocumentCount() { + return this.lastDeletedDocumentCount; + } + + /** + * API name: {@code last_incremental_sync_scheduled_at} + */ + @Nullable + public final DateTime lastIncrementalSyncScheduledAt() { + return this.lastIncrementalSyncScheduledAt; + } + + /** + * API name: {@code last_indexed_document_count} + */ + @Nullable + public final Long lastIndexedDocumentCount() { + return this.lastIndexedDocumentCount; + } + + /** + * API name: {@code last_seen} + */ + @Nullable + public final DateTime lastSeen() { + return this.lastSeen; + } + + /** + * API name: {@code last_sync_error} + */ + @Nullable + public final String lastSyncError() { + return this.lastSyncError; + } + + /** + * API name: {@code last_sync_scheduled_at} + */ + @Nullable + public final DateTime lastSyncScheduledAt() { + return this.lastSyncScheduledAt; + } + + /** + * API name: {@code last_sync_status} + */ + @Nullable + public final SyncStatus lastSyncStatus() { + return this.lastSyncStatus; + } + + /** + * API name: {@code last_synced} + */ + @Nullable + public final DateTime lastSynced() { + return this.lastSynced; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code pipeline} + */ + @Nullable + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Required - API name: {@code scheduling} + */ + public final SchedulingConfiguration scheduling() { + return this.scheduling; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Required - API name: {@code status} + */ + public final ConnectorStatus status() { + return this.status; + } + + /** + * API name: {@code sync_cursor} + */ + @Nullable + public final JsonData syncCursor() { + return this.syncCursor; + } + + /** + * Required - API name: {@code sync_now} + */ + public final boolean syncNow() { + return this.syncNow; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.apiKeyId != null) { + generator.writeKey("api_key_id"); + generator.write(this.apiKeyId); + + } + if (this.apiKeySecretId != null) { + generator.writeKey("api_key_secret_id"); + generator.write(this.apiKeySecretId); + + } + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.customScheduling)) { + generator.writeKey("custom_scheduling"); + generator.writeStartObject(); + for (Map.Entry item0 : this.customScheduling.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.error != null) { + generator.writeKey("error"); + generator.write(this.error); + + } + if (this.features != null) { + generator.writeKey("features"); + this.features.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.filtering)) { + generator.writeKey("filtering"); + generator.writeStartArray(); + for (FilteringConfig item0 : this.filtering) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.id != null) { + generator.writeKey("id"); + generator.write(this.id); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + generator.writeKey("is_native"); + generator.write(this.isNative); + + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.lastAccessControlSyncError != null) { + generator.writeKey("last_access_control_sync_error"); + generator.write(this.lastAccessControlSyncError); + + } + if (this.lastAccessControlSyncScheduledAt != null) { + generator.writeKey("last_access_control_sync_scheduled_at"); + this.lastAccessControlSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastAccessControlSyncStatus != null) { + generator.writeKey("last_access_control_sync_status"); + this.lastAccessControlSyncStatus.serialize(generator, mapper); + } + if (this.lastDeletedDocumentCount != null) { + generator.writeKey("last_deleted_document_count"); + generator.write(this.lastDeletedDocumentCount); + + } + if (this.lastIncrementalSyncScheduledAt != null) { + generator.writeKey("last_incremental_sync_scheduled_at"); + this.lastIncrementalSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastIndexedDocumentCount != null) { + generator.writeKey("last_indexed_document_count"); + generator.write(this.lastIndexedDocumentCount); + + } + if (this.lastSeen != null) { + generator.writeKey("last_seen"); + this.lastSeen.serialize(generator, mapper); + } + if (this.lastSyncError != null) { + generator.writeKey("last_sync_error"); + generator.write(this.lastSyncError); + + } + if (this.lastSyncScheduledAt != null) { + generator.writeKey("last_sync_scheduled_at"); + this.lastSyncScheduledAt.serialize(generator, mapper); + } + if (this.lastSyncStatus != null) { + generator.writeKey("last_sync_status"); + this.lastSyncStatus.serialize(generator, mapper); + } + if (this.lastSynced != null) { + generator.writeKey("last_synced"); + this.lastSynced.serialize(generator, mapper); + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.pipeline != null) { + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + generator.writeKey("scheduling"); + this.scheduling.serialize(generator, mapper); + + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + generator.writeKey("status"); + this.status.serialize(generator, mapper); + if (this.syncCursor != null) { + generator.writeKey("sync_cursor"); + this.syncCursor.serialize(generator, mapper); + + } + generator.writeKey("sync_now"); + generator.write(this.syncNow); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Connector}. + */ + + public static class Builder extends Connector.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Connector}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Connector build() { + _checkSingleUse(); + + return new Connector(this); + } + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + @Nullable + private String apiKeyId; + + @Nullable + private String apiKeySecretId; + + private Map configuration; + + private Map customScheduling; + + @Nullable + private String description; + + @Nullable + private String error; + + @Nullable + private ConnectorFeatures features; + + private List filtering; + + @Nullable + private String id; + + @Nullable + private String indexName; + + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String lastAccessControlSyncError; + + @Nullable + private DateTime lastAccessControlSyncScheduledAt; + + @Nullable + private SyncStatus lastAccessControlSyncStatus; + + @Nullable + private Long lastDeletedDocumentCount; + + @Nullable + private DateTime lastIncrementalSyncScheduledAt; + + @Nullable + private Long lastIndexedDocumentCount; + + @Nullable + private DateTime lastSeen; + + @Nullable + private String lastSyncError; + + @Nullable + private DateTime lastSyncScheduledAt; + + @Nullable + private SyncStatus lastSyncStatus; + + @Nullable + private DateTime lastSynced; + + @Nullable + private String name; + + @Nullable + private IngestPipelineParams pipeline; + + private SchedulingConfiguration scheduling; + + @Nullable + private String serviceType; + + private ConnectorStatus status; + + @Nullable + private JsonData syncCursor; + + private Boolean syncNow; + + /** + * API name: {@code api_key_id} + */ + public final BuilderT apiKeyId(@Nullable String value) { + this.apiKeyId = value; + return self(); + } + + /** + * API name: {@code api_key_secret_id} + */ + public final BuilderT apiKeySecretId(@Nullable String value) { + this.apiKeySecretId = value; + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final BuilderT configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final BuilderT configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return self(); + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final BuilderT configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds all entries of map to customScheduling. + */ + public final BuilderT customScheduling(Map map) { + this.customScheduling = _mapPutAll(this.customScheduling, map); + return self(); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds an entry to customScheduling. + */ + public final BuilderT customScheduling(String key, CustomScheduling value) { + this.customScheduling = _mapPut(this.customScheduling, key, value); + return self(); + } + + /** + * Required - API name: {@code custom_scheduling} + *

+ * Adds an entry to customScheduling using a builder lambda. + */ + public final BuilderT customScheduling(String key, + Function> fn) { + return customScheduling(key, fn.apply(new CustomScheduling.Builder()).build()); + } + + /** + * API name: {@code description} + */ + public final BuilderT description(@Nullable String value) { + this.description = value; + return self(); + } + + /** + * API name: {@code error} + */ + public final BuilderT error(@Nullable String value) { + this.error = value; + return self(); + } + + /** + * API name: {@code features} + */ + public final BuilderT features(@Nullable ConnectorFeatures value) { + this.features = value; + return self(); + } + + /** + * API name: {@code features} + */ + public final BuilderT features(Function> fn) { + return this.features(fn.apply(new ConnectorFeatures.Builder()).build()); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds all elements of list to filtering. + */ + public final BuilderT filtering(List list) { + this.filtering = _listAddAll(this.filtering, list); + return self(); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds one or more values to filtering. + */ + public final BuilderT filtering(FilteringConfig value, FilteringConfig... values) { + this.filtering = _listAdd(this.filtering, value, values); + return self(); + } + + /** + * Required - API name: {@code filtering} + *

+ * Adds a value to filtering using a builder lambda. + */ + public final BuilderT filtering(Function> fn) { + return filtering(fn.apply(new FilteringConfig.Builder()).build()); + } + + /** + * API name: {@code id} + */ + public final BuilderT id(@Nullable String value) { + this.id = value; + return self(); + } + + /** + * API name: {@code index_name} + */ + public final BuilderT indexName(@Nullable String value) { + this.indexName = value; + return self(); + } + + /** + * Required - API name: {@code is_native} + */ + public final BuilderT isNative(boolean value) { + this.isNative = value; + return self(); + } + + /** + * API name: {@code language} + */ + public final BuilderT language(@Nullable String value) { + this.language = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_error} + */ + public final BuilderT lastAccessControlSyncError(@Nullable String value) { + this.lastAccessControlSyncError = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_scheduled_at} + */ + public final BuilderT lastAccessControlSyncScheduledAt(@Nullable DateTime value) { + this.lastAccessControlSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_access_control_sync_status} + */ + public final BuilderT lastAccessControlSyncStatus(@Nullable SyncStatus value) { + this.lastAccessControlSyncStatus = value; + return self(); + } + + /** + * API name: {@code last_deleted_document_count} + */ + public final BuilderT lastDeletedDocumentCount(@Nullable Long value) { + this.lastDeletedDocumentCount = value; + return self(); + } + + /** + * API name: {@code last_incremental_sync_scheduled_at} + */ + public final BuilderT lastIncrementalSyncScheduledAt(@Nullable DateTime value) { + this.lastIncrementalSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_indexed_document_count} + */ + public final BuilderT lastIndexedDocumentCount(@Nullable Long value) { + this.lastIndexedDocumentCount = value; + return self(); + } + + /** + * API name: {@code last_seen} + */ + public final BuilderT lastSeen(@Nullable DateTime value) { + this.lastSeen = value; + return self(); + } + + /** + * API name: {@code last_sync_error} + */ + public final BuilderT lastSyncError(@Nullable String value) { + this.lastSyncError = value; + return self(); + } + + /** + * API name: {@code last_sync_scheduled_at} + */ + public final BuilderT lastSyncScheduledAt(@Nullable DateTime value) { + this.lastSyncScheduledAt = value; + return self(); + } + + /** + * API name: {@code last_sync_status} + */ + public final BuilderT lastSyncStatus(@Nullable SyncStatus value) { + this.lastSyncStatus = value; + return self(); + } + + /** + * API name: {@code last_synced} + */ + public final BuilderT lastSynced(@Nullable DateTime value) { + this.lastSynced = value; + return self(); + } + + /** + * API name: {@code name} + */ + public final BuilderT name(@Nullable String value) { + this.name = value; + return self(); + } + + /** + * API name: {@code pipeline} + */ + public final BuilderT pipeline(@Nullable IngestPipelineParams value) { + this.pipeline = value; + return self(); + } + + /** + * API name: {@code pipeline} + */ + public final BuilderT pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + /** + * Required - API name: {@code scheduling} + */ + public final BuilderT scheduling(SchedulingConfiguration value) { + this.scheduling = value; + return self(); + } + + /** + * Required - API name: {@code scheduling} + */ + public final BuilderT scheduling( + Function> fn) { + return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); + } + + /** + * API name: {@code service_type} + */ + public final BuilderT serviceType(@Nullable String value) { + this.serviceType = value; + return self(); + } + + /** + * Required - API name: {@code status} + */ + public final BuilderT status(ConnectorStatus value) { + this.status = value; + return self(); + } + + /** + * API name: {@code sync_cursor} + */ + public final BuilderT syncCursor(@Nullable JsonData value) { + this.syncCursor = value; + return self(); + } + + /** + * Required - API name: {@code sync_now} + */ + public final BuilderT syncNow(boolean value) { + this.syncNow = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Connector} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Connector::setupConnectorDeserializer); + + protected static > void setupConnectorDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); + op.add(AbstractBuilder::apiKeySecretId, JsonpDeserializer.stringDeserializer(), "api_key_secret_id"); + op.add(AbstractBuilder::configuration, + JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), "configuration"); + op.add(AbstractBuilder::customScheduling, + JsonpDeserializer.stringMapDeserializer(CustomScheduling._DESERIALIZER), "custom_scheduling"); + op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); + op.add(AbstractBuilder::features, ConnectorFeatures._DESERIALIZER, "features"); + op.add(AbstractBuilder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), + "filtering"); + op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(AbstractBuilder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(AbstractBuilder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(AbstractBuilder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(AbstractBuilder::lastAccessControlSyncError, JsonpDeserializer.stringDeserializer(), + "last_access_control_sync_error"); + op.add(AbstractBuilder::lastAccessControlSyncScheduledAt, DateTime._DESERIALIZER, + "last_access_control_sync_scheduled_at"); + op.add(AbstractBuilder::lastAccessControlSyncStatus, SyncStatus._DESERIALIZER, + "last_access_control_sync_status"); + op.add(AbstractBuilder::lastDeletedDocumentCount, JsonpDeserializer.longDeserializer(), + "last_deleted_document_count"); + op.add(AbstractBuilder::lastIncrementalSyncScheduledAt, DateTime._DESERIALIZER, + "last_incremental_sync_scheduled_at"); + op.add(AbstractBuilder::lastIndexedDocumentCount, JsonpDeserializer.longDeserializer(), + "last_indexed_document_count"); + op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); + op.add(AbstractBuilder::lastSyncError, JsonpDeserializer.stringDeserializer(), "last_sync_error"); + op.add(AbstractBuilder::lastSyncScheduledAt, DateTime._DESERIALIZER, "last_sync_scheduled_at"); + op.add(AbstractBuilder::lastSyncStatus, SyncStatus._DESERIALIZER, "last_sync_status"); + op.add(AbstractBuilder::lastSynced, DateTime._DESERIALIZER, "last_synced"); + op.add(AbstractBuilder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(AbstractBuilder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + op.add(AbstractBuilder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); + op.add(AbstractBuilder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + op.add(AbstractBuilder::status, ConnectorStatus._DESERIALIZER, "status"); + op.add(AbstractBuilder::syncCursor, JsonData._DESERIALIZER, "sync_cursor"); + op.add(AbstractBuilder::syncNow, JsonpDeserializer.booleanDeserializer(), "sync_now"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java new file mode 100644 index 000000000..5ec7b6386 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorConfigProperties.java @@ -0,0 +1,666 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorConfigProperties + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorConfigProperties implements JsonpSerializable { + @Nullable + private final String category; + + private final FieldValue defaultValue; + + private final List dependsOn; + + private final DisplayType display; + + private final String label; + + private final List options; + + @Nullable + private final Integer order; + + @Nullable + private final String placeholder; + + private final boolean required; + + private final boolean sensitive; + + @Nullable + private final String tooltip; + + @Nullable + private final ConnectorFieldType type; + + private final List uiRestrictions; + + private final List validations; + + private final JsonData value; + + // --------------------------------------------------------------------------------------------- + + private ConnectorConfigProperties(Builder builder) { + + this.category = builder.category; + this.defaultValue = ApiTypeHelper.requireNonNull(builder.defaultValue, this, "defaultValue"); + this.dependsOn = ApiTypeHelper.unmodifiableRequired(builder.dependsOn, this, "dependsOn"); + this.display = ApiTypeHelper.requireNonNull(builder.display, this, "display"); + this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); + this.options = ApiTypeHelper.unmodifiableRequired(builder.options, this, "options"); + this.order = builder.order; + this.placeholder = builder.placeholder; + this.required = ApiTypeHelper.requireNonNull(builder.required, this, "required"); + this.sensitive = ApiTypeHelper.requireNonNull(builder.sensitive, this, "sensitive"); + this.tooltip = builder.tooltip; + this.type = builder.type; + this.uiRestrictions = ApiTypeHelper.unmodifiable(builder.uiRestrictions); + this.validations = ApiTypeHelper.unmodifiable(builder.validations); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static ConnectorConfigProperties of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code category} + */ + @Nullable + public final String category() { + return this.category; + } + + /** + * Required - API name: {@code default_value} + */ + public final FieldValue defaultValue() { + return this.defaultValue; + } + + /** + * Required - API name: {@code depends_on} + */ + public final List dependsOn() { + return this.dependsOn; + } + + /** + * Required - API name: {@code display} + */ + public final DisplayType display() { + return this.display; + } + + /** + * Required - API name: {@code label} + */ + public final String label() { + return this.label; + } + + /** + * Required - API name: {@code options} + */ + public final List options() { + return this.options; + } + + /** + * API name: {@code order} + */ + @Nullable + public final Integer order() { + return this.order; + } + + /** + * API name: {@code placeholder} + */ + @Nullable + public final String placeholder() { + return this.placeholder; + } + + /** + * Required - API name: {@code required} + */ + public final boolean required() { + return this.required; + } + + /** + * Required - API name: {@code sensitive} + */ + public final boolean sensitive() { + return this.sensitive; + } + + /** + * API name: {@code tooltip} + */ + @Nullable + public final String tooltip() { + return this.tooltip; + } + + /** + * API name: {@code type} + */ + @Nullable + public final ConnectorFieldType type() { + return this.type; + } + + /** + * API name: {@code ui_restrictions} + */ + public final List uiRestrictions() { + return this.uiRestrictions; + } + + /** + * API name: {@code validations} + */ + public final List validations() { + return this.validations; + } + + /** + * Required - API name: {@code value} + */ + public final JsonData value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.category != null) { + generator.writeKey("category"); + generator.write(this.category); + + } + generator.writeKey("default_value"); + this.defaultValue.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.dependsOn)) { + generator.writeKey("depends_on"); + generator.writeStartArray(); + for (Dependency item0 : this.dependsOn) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("display"); + this.display.serialize(generator, mapper); + generator.writeKey("label"); + generator.write(this.label); + + if (ApiTypeHelper.isDefined(this.options)) { + generator.writeKey("options"); + generator.writeStartArray(); + for (SelectOption item0 : this.options) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.order != null) { + generator.writeKey("order"); + generator.write(this.order); + + } + if (this.placeholder != null) { + generator.writeKey("placeholder"); + generator.write(this.placeholder); + + } + generator.writeKey("required"); + generator.write(this.required); + + generator.writeKey("sensitive"); + generator.write(this.sensitive); + + if (this.tooltip != null) { + generator.writeKey("tooltip"); + generator.write(this.tooltip); + + } + if (this.type != null) { + generator.writeKey("type"); + this.type.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.uiRestrictions)) { + generator.writeKey("ui_restrictions"); + generator.writeStartArray(); + for (String item0 : this.uiRestrictions) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.validations)) { + generator.writeKey("validations"); + generator.writeStartArray(); + for (Validation item0 : this.validations) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorConfigProperties}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private String category; + + private FieldValue defaultValue; + + private List dependsOn; + + private DisplayType display; + + private String label; + + private List options; + + @Nullable + private Integer order; + + @Nullable + private String placeholder; + + private Boolean required; + + private Boolean sensitive; + + @Nullable + private String tooltip; + + @Nullable + private ConnectorFieldType type; + + @Nullable + private List uiRestrictions; + + @Nullable + private List validations; + + private JsonData value; + + /** + * API name: {@code category} + */ + public final Builder category(@Nullable String value) { + this.category = value; + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(FieldValue value) { + this.defaultValue = value; + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(Function> fn) { + return this.defaultValue(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(String value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(long value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(double value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code default_value} + */ + public final Builder defaultValue(boolean value) { + this.defaultValue = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds all elements of list to dependsOn. + */ + public final Builder dependsOn(List list) { + this.dependsOn = _listAddAll(this.dependsOn, list); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds one or more values to dependsOn. + */ + public final Builder dependsOn(Dependency value, Dependency... values) { + this.dependsOn = _listAdd(this.dependsOn, value, values); + return this; + } + + /** + * Required - API name: {@code depends_on} + *

+ * Adds a value to dependsOn using a builder lambda. + */ + public final Builder dependsOn(Function> fn) { + return dependsOn(fn.apply(new Dependency.Builder()).build()); + } + + /** + * Required - API name: {@code display} + */ + public final Builder display(DisplayType value) { + this.display = value; + return this; + } + + /** + * Required - API name: {@code label} + */ + public final Builder label(String value) { + this.label = value; + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds all elements of list to options. + */ + public final Builder options(List list) { + this.options = _listAddAll(this.options, list); + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds one or more values to options. + */ + public final Builder options(SelectOption value, SelectOption... values) { + this.options = _listAdd(this.options, value, values); + return this; + } + + /** + * Required - API name: {@code options} + *

+ * Adds a value to options using a builder lambda. + */ + public final Builder options(Function> fn) { + return options(fn.apply(new SelectOption.Builder()).build()); + } + + /** + * API name: {@code order} + */ + public final Builder order(@Nullable Integer value) { + this.order = value; + return this; + } + + /** + * API name: {@code placeholder} + */ + public final Builder placeholder(@Nullable String value) { + this.placeholder = value; + return this; + } + + /** + * Required - API name: {@code required} + */ + public final Builder required(boolean value) { + this.required = value; + return this; + } + + /** + * Required - API name: {@code sensitive} + */ + public final Builder sensitive(boolean value) { + this.sensitive = value; + return this; + } + + /** + * API name: {@code tooltip} + */ + public final Builder tooltip(@Nullable String value) { + this.tooltip = value; + return this; + } + + /** + * API name: {@code type} + */ + public final Builder type(@Nullable ConnectorFieldType value) { + this.type = value; + return this; + } + + /** + * API name: {@code ui_restrictions} + *

+ * Adds all elements of list to uiRestrictions. + */ + public final Builder uiRestrictions(List list) { + this.uiRestrictions = _listAddAll(this.uiRestrictions, list); + return this; + } + + /** + * API name: {@code ui_restrictions} + *

+ * Adds one or more values to uiRestrictions. + */ + public final Builder uiRestrictions(String value, String... values) { + this.uiRestrictions = _listAdd(this.uiRestrictions, value, values); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds all elements of list to validations. + */ + public final Builder validations(List list) { + this.validations = _listAddAll(this.validations, list); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds one or more values to validations. + */ + public final Builder validations(Validation value, Validation... values) { + this.validations = _listAdd(this.validations, value, values); + return this; + } + + /** + * API name: {@code validations} + *

+ * Adds a value to validations using a builder lambda. + */ + public final Builder validations(Function> fn) { + return validations(fn.apply(new Validation.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(JsonData value) { + this.value = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorConfigProperties}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorConfigProperties build() { + _checkSingleUse(); + + return new ConnectorConfigProperties(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorConfigProperties} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorConfigProperties::setupConnectorConfigPropertiesDeserializer); + + protected static void setupConnectorConfigPropertiesDeserializer( + ObjectDeserializer op) { + + op.add(Builder::category, JsonpDeserializer.stringDeserializer(), "category"); + op.add(Builder::defaultValue, FieldValue._DESERIALIZER, "default_value"); + op.add(Builder::dependsOn, JsonpDeserializer.arrayDeserializer(Dependency._DESERIALIZER), "depends_on"); + op.add(Builder::display, DisplayType._DESERIALIZER, "display"); + op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); + op.add(Builder::options, JsonpDeserializer.arrayDeserializer(SelectOption._DESERIALIZER), "options"); + op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); + op.add(Builder::placeholder, JsonpDeserializer.stringDeserializer(), "placeholder"); + op.add(Builder::required, JsonpDeserializer.booleanDeserializer(), "required"); + op.add(Builder::sensitive, JsonpDeserializer.booleanDeserializer(), "sensitive"); + op.add(Builder::tooltip, JsonpDeserializer.stringDeserializer(), "tooltip"); + op.add(Builder::type, ConnectorFieldType._DESERIALIZER, "type"); + op.add(Builder::uiRestrictions, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "ui_restrictions"); + op.add(Builder::validations, JsonpDeserializer.arrayDeserializer(Validation._DESERIALIZER), "validations"); + op.add(Builder::value, JsonData._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java new file mode 100644 index 000000000..04e6f8ca4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFeatures.java @@ -0,0 +1,274 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorFeatures + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorFeatures implements JsonpSerializable { + @Nullable + private final FeatureEnabled documentLevelSecurity; + + @Nullable + private final FeatureEnabled incrementalSync; + + @Nullable + private final FeatureEnabled nativeConnectorApiKeys; + + @Nullable + private final SyncRulesFeature syncRules; + + // --------------------------------------------------------------------------------------------- + + private ConnectorFeatures(Builder builder) { + + this.documentLevelSecurity = builder.documentLevelSecurity; + this.incrementalSync = builder.incrementalSync; + this.nativeConnectorApiKeys = builder.nativeConnectorApiKeys; + this.syncRules = builder.syncRules; + + } + + public static ConnectorFeatures of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code document_level_security} + */ + @Nullable + public final FeatureEnabled documentLevelSecurity() { + return this.documentLevelSecurity; + } + + /** + * API name: {@code incremental_sync} + */ + @Nullable + public final FeatureEnabled incrementalSync() { + return this.incrementalSync; + } + + /** + * API name: {@code native_connector_api_keys} + */ + @Nullable + public final FeatureEnabled nativeConnectorApiKeys() { + return this.nativeConnectorApiKeys; + } + + /** + * API name: {@code sync_rules} + */ + @Nullable + public final SyncRulesFeature syncRules() { + return this.syncRules; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.documentLevelSecurity != null) { + generator.writeKey("document_level_security"); + this.documentLevelSecurity.serialize(generator, mapper); + + } + if (this.incrementalSync != null) { + generator.writeKey("incremental_sync"); + this.incrementalSync.serialize(generator, mapper); + + } + if (this.nativeConnectorApiKeys != null) { + generator.writeKey("native_connector_api_keys"); + this.nativeConnectorApiKeys.serialize(generator, mapper); + + } + if (this.syncRules != null) { + generator.writeKey("sync_rules"); + this.syncRules.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorFeatures}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private FeatureEnabled documentLevelSecurity; + + @Nullable + private FeatureEnabled incrementalSync; + + @Nullable + private FeatureEnabled nativeConnectorApiKeys; + + @Nullable + private SyncRulesFeature syncRules; + + /** + * API name: {@code document_level_security} + */ + public final Builder documentLevelSecurity(@Nullable FeatureEnabled value) { + this.documentLevelSecurity = value; + return this; + } + + /** + * API name: {@code document_level_security} + */ + public final Builder documentLevelSecurity(Function> fn) { + return this.documentLevelSecurity(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code incremental_sync} + */ + public final Builder incrementalSync(@Nullable FeatureEnabled value) { + this.incrementalSync = value; + return this; + } + + /** + * API name: {@code incremental_sync} + */ + public final Builder incrementalSync(Function> fn) { + return this.incrementalSync(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code native_connector_api_keys} + */ + public final Builder nativeConnectorApiKeys(@Nullable FeatureEnabled value) { + this.nativeConnectorApiKeys = value; + return this; + } + + /** + * API name: {@code native_connector_api_keys} + */ + public final Builder nativeConnectorApiKeys( + Function> fn) { + return this.nativeConnectorApiKeys(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code sync_rules} + */ + public final Builder syncRules(@Nullable SyncRulesFeature value) { + this.syncRules = value; + return this; + } + + /** + * API name: {@code sync_rules} + */ + public final Builder syncRules(Function> fn) { + return this.syncRules(fn.apply(new SyncRulesFeature.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorFeatures}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorFeatures build() { + _checkSingleUse(); + + return new ConnectorFeatures(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorFeatures} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorFeatures::setupConnectorFeaturesDeserializer); + + protected static void setupConnectorFeaturesDeserializer(ObjectDeserializer op) { + + op.add(Builder::documentLevelSecurity, FeatureEnabled._DESERIALIZER, "document_level_security"); + op.add(Builder::incrementalSync, FeatureEnabled._DESERIALIZER, "incremental_sync"); + op.add(Builder::nativeConnectorApiKeys, FeatureEnabled._DESERIALIZER, "native_connector_api_keys"); + op.add(Builder::syncRules, SyncRulesFeature._DESERIALIZER, "sync_rules"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java new file mode 100644 index 000000000..cbe0abe34 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorFieldType.java @@ -0,0 +1,71 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ConnectorFieldType implements JsonEnum { + Str("str"), + + Int("int"), + + List("list"), + + Bool("bool"), + + ; + + private final String jsonValue; + + ConnectorFieldType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ConnectorFieldType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java new file mode 100644 index 000000000..005338d47 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorScheduling.java @@ -0,0 +1,185 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorScheduling + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorScheduling implements JsonpSerializable { + private final boolean enabled; + + private final String interval; + + // --------------------------------------------------------------------------------------------- + + private ConnectorScheduling(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); + + } + + public static ConnectorScheduling of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Required - The interval is expressed using the crontab syntax + *

+ * API name: {@code interval} + */ + public final String interval() { + return this.interval; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("enabled"); + generator.write(this.enabled); + + generator.writeKey("interval"); + generator.write(this.interval); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorScheduling}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean enabled; + + private String interval; + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + /** + * Required - The interval is expressed using the crontab syntax + *

+ * API name: {@code interval} + */ + public final Builder interval(String value) { + this.interval = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorScheduling}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorScheduling build() { + _checkSingleUse(); + + return new ConnectorScheduling(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorScheduling} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ConnectorScheduling::setupConnectorSchedulingDeserializer); + + protected static void setupConnectorSchedulingDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java new file mode 100644 index 000000000..2407d8c10 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorStatus.java @@ -0,0 +1,73 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ConnectorStatus implements JsonEnum { + Created("created"), + + NeedsConfiguration("needs_configuration"), + + Configured("configured"), + + Connected("connected"), + + Error("error"), + + ; + + private final String jsonValue; + + ConnectorStatus(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ConnectorStatus.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java new file mode 100644 index 000000000..1b1e0e434 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ConnectorSyncJob.java @@ -0,0 +1,634 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +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; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ConnectorSyncJob + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ConnectorSyncJob implements JsonpSerializable { + @Nullable + private final DateTime cancelationRequestedAt; + + @Nullable + private final DateTime canceledAt; + + @Nullable + private final DateTime completedAt; + + private final SyncJobConnectorReference connector; + + private final DateTime createdAt; + + private final long deletedDocumentCount; + + @Nullable + private final String error; + + private final String id; + + private final long indexedDocumentCount; + + private final long indexedDocumentVolume; + + private final SyncJobType jobType; + + @Nullable + private final DateTime lastSeen; + + private final Map metadata; + + @Nullable + private final DateTime startedAt; + + private final SyncStatus status; + + private final long totalDocumentCount; + + private final SyncJobTriggerMethod triggerMethod; + + @Nullable + private final String workerHostname; + + // --------------------------------------------------------------------------------------------- + + protected ConnectorSyncJob(AbstractBuilder builder) { + + this.cancelationRequestedAt = builder.cancelationRequestedAt; + this.canceledAt = builder.canceledAt; + this.completedAt = builder.completedAt; + this.connector = ApiTypeHelper.requireNonNull(builder.connector, this, "connector"); + this.createdAt = ApiTypeHelper.requireNonNull(builder.createdAt, this, "createdAt"); + this.deletedDocumentCount = ApiTypeHelper.requireNonNull(builder.deletedDocumentCount, this, + "deletedDocumentCount"); + this.error = builder.error; + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.indexedDocumentCount = ApiTypeHelper.requireNonNull(builder.indexedDocumentCount, this, + "indexedDocumentCount"); + this.indexedDocumentVolume = ApiTypeHelper.requireNonNull(builder.indexedDocumentVolume, this, + "indexedDocumentVolume"); + this.jobType = ApiTypeHelper.requireNonNull(builder.jobType, this, "jobType"); + this.lastSeen = builder.lastSeen; + this.metadata = ApiTypeHelper.unmodifiableRequired(builder.metadata, this, "metadata"); + this.startedAt = builder.startedAt; + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + this.totalDocumentCount = ApiTypeHelper.requireNonNull(builder.totalDocumentCount, this, "totalDocumentCount"); + this.triggerMethod = ApiTypeHelper.requireNonNull(builder.triggerMethod, this, "triggerMethod"); + this.workerHostname = builder.workerHostname; + + } + + public static ConnectorSyncJob connectorSyncJobOf(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code cancelation_requested_at} + */ + @Nullable + public final DateTime cancelationRequestedAt() { + return this.cancelationRequestedAt; + } + + /** + * API name: {@code canceled_at} + */ + @Nullable + public final DateTime canceledAt() { + return this.canceledAt; + } + + /** + * API name: {@code completed_at} + */ + @Nullable + public final DateTime completedAt() { + return this.completedAt; + } + + /** + * Required - API name: {@code connector} + */ + public final SyncJobConnectorReference connector() { + return this.connector; + } + + /** + * Required - API name: {@code created_at} + */ + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * Required - API name: {@code deleted_document_count} + */ + public final long deletedDocumentCount() { + return this.deletedDocumentCount; + } + + /** + * API name: {@code error} + */ + @Nullable + public final String error() { + return this.error; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code indexed_document_count} + */ + public final long indexedDocumentCount() { + return this.indexedDocumentCount; + } + + /** + * Required - API name: {@code indexed_document_volume} + */ + public final long indexedDocumentVolume() { + return this.indexedDocumentVolume; + } + + /** + * Required - API name: {@code job_type} + */ + public final SyncJobType jobType() { + return this.jobType; + } + + /** + * API name: {@code last_seen} + */ + @Nullable + public final DateTime lastSeen() { + return this.lastSeen; + } + + /** + * Required - API name: {@code metadata} + */ + public final Map metadata() { + return this.metadata; + } + + /** + * API name: {@code started_at} + */ + @Nullable + public final DateTime startedAt() { + return this.startedAt; + } + + /** + * Required - API name: {@code status} + */ + public final SyncStatus status() { + return this.status; + } + + /** + * Required - API name: {@code total_document_count} + */ + public final long totalDocumentCount() { + return this.totalDocumentCount; + } + + /** + * Required - API name: {@code trigger_method} + */ + public final SyncJobTriggerMethod triggerMethod() { + return this.triggerMethod; + } + + /** + * API name: {@code worker_hostname} + */ + @Nullable + public final String workerHostname() { + return this.workerHostname; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.cancelationRequestedAt != null) { + generator.writeKey("cancelation_requested_at"); + this.cancelationRequestedAt.serialize(generator, mapper); + } + if (this.canceledAt != null) { + generator.writeKey("canceled_at"); + this.canceledAt.serialize(generator, mapper); + } + if (this.completedAt != null) { + generator.writeKey("completed_at"); + this.completedAt.serialize(generator, mapper); + } + generator.writeKey("connector"); + this.connector.serialize(generator, mapper); + + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + generator.writeKey("deleted_document_count"); + generator.write(this.deletedDocumentCount); + + if (this.error != null) { + generator.writeKey("error"); + generator.write(this.error); + + } + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("indexed_document_count"); + generator.write(this.indexedDocumentCount); + + generator.writeKey("indexed_document_volume"); + generator.write(this.indexedDocumentVolume); + + generator.writeKey("job_type"); + this.jobType.serialize(generator, mapper); + if (this.lastSeen != null) { + generator.writeKey("last_seen"); + this.lastSeen.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.metadata)) { + generator.writeKey("metadata"); + generator.writeStartObject(); + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.startedAt != null) { + generator.writeKey("started_at"); + this.startedAt.serialize(generator, mapper); + } + generator.writeKey("status"); + this.status.serialize(generator, mapper); + generator.writeKey("total_document_count"); + generator.write(this.totalDocumentCount); + + generator.writeKey("trigger_method"); + this.triggerMethod.serialize(generator, mapper); + if (this.workerHostname != null) { + generator.writeKey("worker_hostname"); + generator.write(this.workerHostname); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ConnectorSyncJob}. + */ + + public static class Builder extends ConnectorSyncJob.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ConnectorSyncJob}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ConnectorSyncJob build() { + _checkSingleUse(); + + return new ConnectorSyncJob(this); + } + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + @Nullable + private DateTime cancelationRequestedAt; + + @Nullable + private DateTime canceledAt; + + @Nullable + private DateTime completedAt; + + private SyncJobConnectorReference connector; + + private DateTime createdAt; + + private Long deletedDocumentCount; + + @Nullable + private String error; + + private String id; + + private Long indexedDocumentCount; + + private Long indexedDocumentVolume; + + private SyncJobType jobType; + + @Nullable + private DateTime lastSeen; + + private Map metadata; + + @Nullable + private DateTime startedAt; + + private SyncStatus status; + + private Long totalDocumentCount; + + private SyncJobTriggerMethod triggerMethod; + + @Nullable + private String workerHostname; + + /** + * API name: {@code cancelation_requested_at} + */ + public final BuilderT cancelationRequestedAt(@Nullable DateTime value) { + this.cancelationRequestedAt = value; + return self(); + } + + /** + * API name: {@code canceled_at} + */ + public final BuilderT canceledAt(@Nullable DateTime value) { + this.canceledAt = value; + return self(); + } + + /** + * API name: {@code completed_at} + */ + public final BuilderT completedAt(@Nullable DateTime value) { + this.completedAt = value; + return self(); + } + + /** + * Required - API name: {@code connector} + */ + public final BuilderT connector(SyncJobConnectorReference value) { + this.connector = value; + return self(); + } + + /** + * Required - API name: {@code connector} + */ + public final BuilderT connector( + Function> fn) { + return this.connector(fn.apply(new SyncJobConnectorReference.Builder()).build()); + } + + /** + * Required - API name: {@code created_at} + */ + public final BuilderT createdAt(DateTime value) { + this.createdAt = value; + return self(); + } + + /** + * Required - API name: {@code deleted_document_count} + */ + public final BuilderT deletedDocumentCount(long value) { + this.deletedDocumentCount = value; + return self(); + } + + /** + * API name: {@code error} + */ + public final BuilderT error(@Nullable String value) { + this.error = value; + return self(); + } + + /** + * Required - API name: {@code id} + */ + public final BuilderT id(String value) { + this.id = value; + return self(); + } + + /** + * Required - API name: {@code indexed_document_count} + */ + public final BuilderT indexedDocumentCount(long value) { + this.indexedDocumentCount = value; + return self(); + } + + /** + * Required - API name: {@code indexed_document_volume} + */ + public final BuilderT indexedDocumentVolume(long value) { + this.indexedDocumentVolume = value; + return self(); + } + + /** + * Required - API name: {@code job_type} + */ + public final BuilderT jobType(SyncJobType value) { + this.jobType = value; + return self(); + } + + /** + * API name: {@code last_seen} + */ + public final BuilderT lastSeen(@Nullable DateTime value) { + this.lastSeen = value; + return self(); + } + + /** + * Required - API name: {@code metadata} + *

+ * Adds all entries of map to metadata. + */ + public final BuilderT metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return self(); + } + + /** + * Required - API name: {@code metadata} + *

+ * Adds an entry to metadata. + */ + public final BuilderT metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return self(); + } + + /** + * API name: {@code started_at} + */ + public final BuilderT startedAt(@Nullable DateTime value) { + this.startedAt = value; + return self(); + } + + /** + * Required - API name: {@code status} + */ + public final BuilderT status(SyncStatus value) { + this.status = value; + return self(); + } + + /** + * Required - API name: {@code total_document_count} + */ + public final BuilderT totalDocumentCount(long value) { + this.totalDocumentCount = value; + return self(); + } + + /** + * Required - API name: {@code trigger_method} + */ + public final BuilderT triggerMethod(SyncJobTriggerMethod value) { + this.triggerMethod = value; + return self(); + } + + /** + * API name: {@code worker_hostname} + */ + public final BuilderT workerHostname(@Nullable String value) { + this.workerHostname = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ConnectorSyncJob} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ConnectorSyncJob::setupConnectorSyncJobDeserializer); + + protected static > void setupConnectorSyncJobDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::cancelationRequestedAt, DateTime._DESERIALIZER, "cancelation_requested_at"); + op.add(AbstractBuilder::canceledAt, DateTime._DESERIALIZER, "canceled_at"); + op.add(AbstractBuilder::completedAt, DateTime._DESERIALIZER, "completed_at"); + op.add(AbstractBuilder::connector, SyncJobConnectorReference._DESERIALIZER, "connector"); + op.add(AbstractBuilder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(AbstractBuilder::deletedDocumentCount, JsonpDeserializer.longDeserializer(), "deleted_document_count"); + op.add(AbstractBuilder::error, JsonpDeserializer.stringDeserializer(), "error"); + op.add(AbstractBuilder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(AbstractBuilder::indexedDocumentCount, JsonpDeserializer.longDeserializer(), "indexed_document_count"); + op.add(AbstractBuilder::indexedDocumentVolume, JsonpDeserializer.longDeserializer(), "indexed_document_volume"); + op.add(AbstractBuilder::jobType, SyncJobType._DESERIALIZER, "job_type"); + op.add(AbstractBuilder::lastSeen, DateTime._DESERIALIZER, "last_seen"); + op.add(AbstractBuilder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); + op.add(AbstractBuilder::startedAt, DateTime._DESERIALIZER, "started_at"); + op.add(AbstractBuilder::status, SyncStatus._DESERIALIZER, "status"); + op.add(AbstractBuilder::totalDocumentCount, JsonpDeserializer.longDeserializer(), "total_document_count"); + op.add(AbstractBuilder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); + op.add(AbstractBuilder::workerHostname, JsonpDeserializer.stringDeserializer(), "worker_hostname"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java new file mode 100644 index 000000000..302a7d46f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomScheduling.java @@ -0,0 +1,266 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +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; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.CustomScheduling + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CustomScheduling implements JsonpSerializable { + private final CustomSchedulingConfigurationOverrides configurationOverrides; + + private final boolean enabled; + + private final String interval; + + @Nullable + private final DateTime lastSynced; + + private final String name; + + // --------------------------------------------------------------------------------------------- + + private CustomScheduling(Builder builder) { + + this.configurationOverrides = ApiTypeHelper.requireNonNull(builder.configurationOverrides, this, + "configurationOverrides"); + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); + this.lastSynced = builder.lastSynced; + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + + } + + public static CustomScheduling of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code configuration_overrides} + */ + public final CustomSchedulingConfigurationOverrides configurationOverrides() { + return this.configurationOverrides; + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Required - API name: {@code interval} + */ + public final String interval() { + return this.interval; + } + + /** + * API name: {@code last_synced} + */ + @Nullable + public final DateTime lastSynced() { + return this.lastSynced; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("configuration_overrides"); + this.configurationOverrides.serialize(generator, mapper); + + generator.writeKey("enabled"); + generator.write(this.enabled); + + generator.writeKey("interval"); + generator.write(this.interval); + + if (this.lastSynced != null) { + generator.writeKey("last_synced"); + this.lastSynced.serialize(generator, mapper); + } + generator.writeKey("name"); + generator.write(this.name); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CustomScheduling}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private CustomSchedulingConfigurationOverrides configurationOverrides; + + private Boolean enabled; + + private String interval; + + @Nullable + private DateTime lastSynced; + + private String name; + + /** + * Required - API name: {@code configuration_overrides} + */ + public final Builder configurationOverrides(CustomSchedulingConfigurationOverrides value) { + this.configurationOverrides = value; + return this; + } + + /** + * Required - API name: {@code configuration_overrides} + */ + public final Builder configurationOverrides( + Function> fn) { + return this.configurationOverrides(fn.apply(new CustomSchedulingConfigurationOverrides.Builder()).build()); + } + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + /** + * Required - API name: {@code interval} + */ + public final Builder interval(String value) { + this.interval = value; + return this; + } + + /** + * API name: {@code last_synced} + */ + public final Builder lastSynced(@Nullable DateTime value) { + this.lastSynced = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CustomScheduling}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CustomScheduling build() { + _checkSingleUse(); + + return new CustomScheduling(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CustomScheduling} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CustomScheduling::setupCustomSchedulingDeserializer); + + protected static void setupCustomSchedulingDeserializer(ObjectDeserializer op) { + + op.add(Builder::configurationOverrides, CustomSchedulingConfigurationOverrides._DESERIALIZER, + "configuration_overrides"); + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::interval, JsonpDeserializer.stringDeserializer(), "interval"); + op.add(Builder::lastSynced, DateTime._DESERIALIZER, "last_synced"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java new file mode 100644 index 000000000..11d919a0b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/CustomSchedulingConfigurationOverrides.java @@ -0,0 +1,333 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.CustomSchedulingConfigurationOverrides + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CustomSchedulingConfigurationOverrides implements JsonpSerializable { + @Nullable + private final Integer maxCrawlDepth; + + @Nullable + private final Boolean sitemapDiscoveryDisabled; + + private final List domainAllowlist; + + private final List sitemapUrls; + + private final List seedUrls; + + // --------------------------------------------------------------------------------------------- + + private CustomSchedulingConfigurationOverrides(Builder builder) { + + this.maxCrawlDepth = builder.maxCrawlDepth; + this.sitemapDiscoveryDisabled = builder.sitemapDiscoveryDisabled; + this.domainAllowlist = ApiTypeHelper.unmodifiable(builder.domainAllowlist); + this.sitemapUrls = ApiTypeHelper.unmodifiable(builder.sitemapUrls); + this.seedUrls = ApiTypeHelper.unmodifiable(builder.seedUrls); + + } + + public static CustomSchedulingConfigurationOverrides of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code max_crawl_depth} + */ + @Nullable + public final Integer maxCrawlDepth() { + return this.maxCrawlDepth; + } + + /** + * API name: {@code sitemap_discovery_disabled} + */ + @Nullable + public final Boolean sitemapDiscoveryDisabled() { + return this.sitemapDiscoveryDisabled; + } + + /** + * API name: {@code domain_allowlist} + */ + public final List domainAllowlist() { + return this.domainAllowlist; + } + + /** + * API name: {@code sitemap_urls} + */ + public final List sitemapUrls() { + return this.sitemapUrls; + } + + /** + * API name: {@code seed_urls} + */ + public final List seedUrls() { + return this.seedUrls; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.maxCrawlDepth != null) { + generator.writeKey("max_crawl_depth"); + generator.write(this.maxCrawlDepth); + + } + if (this.sitemapDiscoveryDisabled != null) { + generator.writeKey("sitemap_discovery_disabled"); + generator.write(this.sitemapDiscoveryDisabled); + + } + if (ApiTypeHelper.isDefined(this.domainAllowlist)) { + generator.writeKey("domain_allowlist"); + generator.writeStartArray(); + for (String item0 : this.domainAllowlist) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.sitemapUrls)) { + generator.writeKey("sitemap_urls"); + generator.writeStartArray(); + for (String item0 : this.sitemapUrls) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.seedUrls)) { + generator.writeKey("seed_urls"); + generator.writeStartArray(); + for (String item0 : this.seedUrls) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CustomSchedulingConfigurationOverrides}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Integer maxCrawlDepth; + + @Nullable + private Boolean sitemapDiscoveryDisabled; + + @Nullable + private List domainAllowlist; + + @Nullable + private List sitemapUrls; + + @Nullable + private List seedUrls; + + /** + * API name: {@code max_crawl_depth} + */ + public final Builder maxCrawlDepth(@Nullable Integer value) { + this.maxCrawlDepth = value; + return this; + } + + /** + * API name: {@code sitemap_discovery_disabled} + */ + public final Builder sitemapDiscoveryDisabled(@Nullable Boolean value) { + this.sitemapDiscoveryDisabled = value; + return this; + } + + /** + * API name: {@code domain_allowlist} + *

+ * Adds all elements of list to domainAllowlist. + */ + public final Builder domainAllowlist(List list) { + this.domainAllowlist = _listAddAll(this.domainAllowlist, list); + return this; + } + + /** + * API name: {@code domain_allowlist} + *

+ * Adds one or more values to domainAllowlist. + */ + public final Builder domainAllowlist(String value, String... values) { + this.domainAllowlist = _listAdd(this.domainAllowlist, value, values); + return this; + } + + /** + * API name: {@code sitemap_urls} + *

+ * Adds all elements of list to sitemapUrls. + */ + public final Builder sitemapUrls(List list) { + this.sitemapUrls = _listAddAll(this.sitemapUrls, list); + return this; + } + + /** + * API name: {@code sitemap_urls} + *

+ * Adds one or more values to sitemapUrls. + */ + public final Builder sitemapUrls(String value, String... values) { + this.sitemapUrls = _listAdd(this.sitemapUrls, value, values); + return this; + } + + /** + * API name: {@code seed_urls} + *

+ * Adds all elements of list to seedUrls. + */ + public final Builder seedUrls(List list) { + this.seedUrls = _listAddAll(this.seedUrls, list); + return this; + } + + /** + * API name: {@code seed_urls} + *

+ * Adds one or more values to seedUrls. + */ + public final Builder seedUrls(String value, String... values) { + this.seedUrls = _listAdd(this.seedUrls, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CustomSchedulingConfigurationOverrides}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CustomSchedulingConfigurationOverrides build() { + _checkSingleUse(); + + return new CustomSchedulingConfigurationOverrides(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CustomSchedulingConfigurationOverrides} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + CustomSchedulingConfigurationOverrides::setupCustomSchedulingConfigurationOverridesDeserializer); + + protected static void setupCustomSchedulingConfigurationOverridesDeserializer( + ObjectDeserializer op) { + + op.add(Builder::maxCrawlDepth, JsonpDeserializer.integerDeserializer(), "max_crawl_depth"); + op.add(Builder::sitemapDiscoveryDisabled, JsonpDeserializer.booleanDeserializer(), + "sitemap_discovery_disabled"); + op.add(Builder::domainAllowlist, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "domain_allowlist"); + op.add(Builder::sitemapUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "sitemap_urls"); + op.add(Builder::seedUrls, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "seed_urls"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java new file mode 100644 index 000000000..9cb231331 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java @@ -0,0 +1,214 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.delete.Request + +/** + * Deletes a connector. + * + * @see API + * specification + */ + +public class DeleteConnectorRequest extends RequestBase { + private final String connectorId; + + @Nullable + private final Boolean deleteSyncJobs; + + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.deleteSyncJobs = builder.deleteSyncJobs; + + } + + public static DeleteConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be deleted + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * A flag indicating if associated sync jobs should be also removed. Defaults to + * false. + *

+ * API name: {@code delete_sync_jobs} + */ + @Nullable + public final Boolean deleteSyncJobs() { + return this.deleteSyncJobs; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + @Nullable + private Boolean deleteSyncJobs; + + /** + * Required - The unique identifier of the connector to be deleted + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * A flag indicating if associated sync jobs should be also removed. Defaults to + * false. + *

+ * API name: {@code delete_sync_jobs} + */ + public final Builder deleteSyncJobs(@Nullable Boolean value) { + this.deleteSyncJobs = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteConnectorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteConnectorRequest build() { + _checkSingleUse(); + + return new DeleteConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.delete}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.delete", + + // Request method + request -> { + return "DELETE"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.deleteSyncJobs != null) { + params.put("delete_sync_jobs", String.valueOf(request.deleteSyncJobs)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, DeleteConnectorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java new file mode 100644 index 000000000..801c81a34 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorResponse.java @@ -0,0 +1,108 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.delete.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DeleteConnectorResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorResponse(Builder builder) { + super(builder); + + } + + public static DeleteConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteConnectorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DeleteConnectorResponse build() { + _checkSingleUse(); + + return new DeleteConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DeleteConnectorResponse::setupDeleteConnectorResponseDeserializer); + + protected static void setupDeleteConnectorResponseDeserializer( + ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java new file mode 100644 index 000000000..2934cefe4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Dependency.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Dependency + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Dependency implements JsonpSerializable { + private final String field; + + private final FieldValue value; + + // --------------------------------------------------------------------------------------------- + + private Dependency(Builder builder) { + + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static Dependency of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - API name: {@code value} + */ + public final FieldValue value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("field"); + generator.write(this.field); + + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Dependency}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String field; + + private FieldValue value; + + /** + * Required - API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(FieldValue value) { + this.value = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(Function> fn) { + return this.value(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(long value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(double value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(boolean value) { + this.value = FieldValue.of(value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Dependency}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Dependency build() { + _checkSingleUse(); + + return new Dependency(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Dependency} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Dependency::setupDependencyDeserializer); + + protected static void setupDependencyDeserializer(ObjectDeserializer op) { + + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::value, FieldValue._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java new file mode 100644 index 000000000..93fcd3569 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/DisplayType.java @@ -0,0 +1,72 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum DisplayType implements JsonEnum { + Textbox("textbox"), + + Textarea("textarea"), + + Numeric("numeric"), + + Toggle("toggle"), + + Dropdown("dropdown"), + + ; + + private final String jsonValue; + + DisplayType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + DisplayType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java new file mode 100644 index 000000000..5c5f4cabe --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java @@ -0,0 +1,915 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Client for the connector namespace. + */ +public class ElasticsearchConnectorAsyncClient + extends + ApiClient { + + public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchConnectorAsyncClient(ElasticsearchTransport transport, + @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchConnectorAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchConnectorAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: connector.check_in + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture checkIn(CheckInRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @param fn + * a function that initializes a builder to create the + * {@link CheckInRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture checkIn( + Function> fn) { + return checkIn(fn.apply(new CheckInRequest.Builder()).build()); + } + + // ----- Endpoint: connector.delete + + /** + * Deletes a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture delete(DeleteConnectorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture delete( + Function> fn) { + return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.get + + /** + * Retrieves a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture get(GetConnectorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture get( + Function> fn) { + return get(fn.apply(new GetConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.list + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture list(ListRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns existing connectors. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture list(Function> fn) { + return list(fn.apply(new ListRequest.Builder()).build()); + } + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture list() { + return this.transport.performRequestAsync(new ListRequest.Builder().build(), ListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.post + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture post(PostRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PostRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture post(Function> fn) { + return post(fn.apply(new PostRequest.Builder()).build()); + } + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture post() { + return this.transport.performRequestAsync(new PostRequest.Builder().build(), PostRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.put + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture put(PutRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture put(Function> fn) { + return put(fn.apply(new PutRequest.Builder()).build()); + } + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture put() { + return this.transport.performRequestAsync(new PutRequest.Builder().build(), PutRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_cancel + + /** + * Cancels a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobCancel(SyncJobCancelRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Cancels a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobCancelRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobCancel( + Function> fn) { + return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_delete + + /** + * Deletes a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobDelete(SyncJobDeleteRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobDeleteRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobDelete( + Function> fn) { + return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_get + + /** + * Retrieves a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobGet(SyncJobGetRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobGetRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobGet( + Function> fn) { + return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_list + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobList(SyncJobListRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Lists connector sync jobs. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobListRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobList( + Function> fn) { + return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); + } + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobList() { + return this.transport.performRequestAsync(new SyncJobListRequest.Builder().build(), + SyncJobListRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_post + + /** + * Creates a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture syncJobPost(SyncJobPostRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobPostRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture syncJobPost( + Function> fn) { + return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_active_filtering + + /** + * Activates the valid draft filtering for a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateActiveFiltering( + UpdateActiveFilteringRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Activates the valid draft filtering for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateActiveFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateActiveFiltering( + Function> fn) { + return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_api_key_id + + /** + * Updates the API key id in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateApiKeyId(UpdateApiKeyIdRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the API key id in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateApiKeyIdRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateApiKeyId( + Function> fn) { + return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_configuration + + /** + * Updates the configuration field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateConfiguration(UpdateConfigurationRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the configuration field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateConfigurationRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateConfiguration( + Function> fn) { + return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_error + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateError(UpdateErrorRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateErrorRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateError( + Function> fn) { + return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateFiltering(UpdateFilteringRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateFiltering( + Function> fn) { + return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering_validation + + /** + * Updates the draft filtering validation info for a connector. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateFilteringValidation( + UpdateFilteringValidationRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the draft filtering validation info for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringValidationRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateFilteringValidation( + Function> fn) { + return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_index_name + + /** + * Updates the index_name in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateIndexName(UpdateIndexNameRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the index_name in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateIndexNameRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateIndexName( + Function> fn) { + return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_name + + /** + * Updates the name and description fields in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateName(UpdateNameRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the name and description fields in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNameRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateName( + Function> fn) { + return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_native + + /** + * Updates the is_native flag in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateNative(UpdateNativeRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the is_native flag in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNativeRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateNative( + Function> fn) { + return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_pipeline + + /** + * Updates the pipeline field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updatePipeline(UpdatePipelineRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the pipeline field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdatePipelineRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updatePipeline( + Function> fn) { + return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_scheduling + + /** + * Updates the scheduling field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateScheduling(UpdateSchedulingRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the scheduling field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateSchedulingRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateScheduling( + Function> fn) { + return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_service_type + + /** + * Updates the service type of the connector + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateServiceType(UpdateServiceTypeRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the service type of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateServiceTypeRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateServiceType( + Function> fn) { + return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_status + + /** + * Updates the status of the connector + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateStatus(UpdateStatusRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Updates the status of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateStatus( + Function> fn) { + return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java new file mode 100644 index 000000000..f21235230 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java @@ -0,0 +1,942 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.io.IOException; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Client for the connector namespace. + */ +public class ElasticsearchConnectorClient extends ApiClient { + + public ElasticsearchConnectorClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchConnectorClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchConnectorClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchConnectorClient(this.transport, transportOptions); + } + + // ----- Endpoint: connector.check_in + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @see Documentation + * on elastic.co + */ + + public CheckInResponse checkIn(CheckInRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CheckInRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the last_seen field in the connector, and sets it to current + * timestamp + * + * @param fn + * a function that initializes a builder to create the + * {@link CheckInRequest} + * @see Documentation + * on elastic.co + */ + + public final CheckInResponse checkIn(Function> fn) + throws IOException, ElasticsearchException { + return checkIn(fn.apply(new CheckInRequest.Builder()).build()); + } + + // ----- Endpoint: connector.delete + + /** + * Deletes a connector. + * + * @see Documentation + * on elastic.co + */ + + public DeleteConnectorResponse delete(DeleteConnectorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) DeleteConnectorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link DeleteConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final DeleteConnectorResponse delete( + Function> fn) + throws IOException, ElasticsearchException { + return delete(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.get + + /** + * Retrieves a connector. + * + * @see Documentation + * on elastic.co + */ + + public GetConnectorResponse get(GetConnectorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetConnectorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetConnectorRequest} + * @see Documentation + * on elastic.co + */ + + public final GetConnectorResponse get(Function> fn) + throws IOException, ElasticsearchException { + return get(fn.apply(new GetConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.list + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public ListResponse list(ListRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns existing connectors. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListRequest} + * @see Documentation + * on elastic.co + */ + + public final ListResponse list(Function> fn) + throws IOException, ElasticsearchException { + return list(fn.apply(new ListRequest.Builder()).build()); + } + + /** + * Returns existing connectors. + * + * @see Documentation + * on elastic.co + */ + + public ListResponse list() throws IOException, ElasticsearchException { + return this.transport.performRequest(new ListRequest.Builder().build(), ListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.post + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PostResponse post(PostRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PostRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PostRequest} + * @see Documentation + * on elastic.co + */ + + public final PostResponse post(Function> fn) + throws IOException, ElasticsearchException { + return post(fn.apply(new PostRequest.Builder()).build()); + } + + /** + * Creates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PostResponse post() throws IOException, ElasticsearchException { + return this.transport.performRequest(new PostRequest.Builder().build(), PostRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.put + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PutResponse put(PutRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PutRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link PutRequest} + * @see Documentation + * on elastic.co + */ + + public final PutResponse put(Function> fn) + throws IOException, ElasticsearchException { + return put(fn.apply(new PutRequest.Builder()).build()); + } + + /** + * Creates or updates a connector. + * + * @see Documentation + * on elastic.co + */ + + public PutResponse put() throws IOException, ElasticsearchException { + return this.transport.performRequest(new PutRequest.Builder().build(), PutRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_cancel + + /** + * Cancels a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobCancelResponse syncJobCancel(SyncJobCancelRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobCancelRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Cancels a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobCancelRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobCancelResponse syncJobCancel( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobCancel(fn.apply(new SyncJobCancelRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_delete + + /** + * Deletes a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobDeleteResponse syncJobDelete(SyncJobDeleteRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobDeleteRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Deletes a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobDeleteRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobDeleteResponse syncJobDelete( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobDelete(fn.apply(new SyncJobDeleteRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_get + + /** + * Retrieves a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobGetResponse syncJobGet(SyncJobGetRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobGetRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Retrieves a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobGetRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobGetResponse syncJobGet(Function> fn) + throws IOException, ElasticsearchException { + return syncJobGet(fn.apply(new SyncJobGetRequest.Builder()).build()); + } + + // ----- Endpoint: connector.sync_job_list + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobListResponse syncJobList(SyncJobListRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobListRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Lists connector sync jobs. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobListRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobListResponse syncJobList( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobList(fn.apply(new SyncJobListRequest.Builder()).build()); + } + + /** + * Lists connector sync jobs. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobListResponse syncJobList() throws IOException, ElasticsearchException { + return this.transport.performRequest(new SyncJobListRequest.Builder().build(), SyncJobListRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: connector.sync_job_post + + /** + * Creates a connector sync job. + * + * @see Documentation + * on elastic.co + */ + + public SyncJobPostResponse syncJobPost(SyncJobPostRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) SyncJobPostRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates a connector sync job. + * + * @param fn + * a function that initializes a builder to create the + * {@link SyncJobPostRequest} + * @see Documentation + * on elastic.co + */ + + public final SyncJobPostResponse syncJobPost( + Function> fn) + throws IOException, ElasticsearchException { + return syncJobPost(fn.apply(new SyncJobPostRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_active_filtering + + /** + * Activates the valid draft filtering for a connector. + * + * @see Documentation + * on elastic.co + */ + + public UpdateActiveFilteringResponse updateActiveFiltering(UpdateActiveFilteringRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateActiveFilteringRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Activates the valid draft filtering for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateActiveFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateActiveFilteringResponse updateActiveFiltering( + Function> fn) + throws IOException, ElasticsearchException { + return updateActiveFiltering(fn.apply(new UpdateActiveFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_api_key_id + + /** + * Updates the API key id in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateApiKeyIdResponse updateApiKeyId(UpdateApiKeyIdRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateApiKeyIdRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the API key id in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateApiKeyIdRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateApiKeyIdResponse updateApiKeyId( + Function> fn) + throws IOException, ElasticsearchException { + return updateApiKeyId(fn.apply(new UpdateApiKeyIdRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_configuration + + /** + * Updates the configuration field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateConfigurationRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the configuration field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateConfigurationRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateConfigurationResponse updateConfiguration( + Function> fn) + throws IOException, ElasticsearchException { + return updateConfiguration(fn.apply(new UpdateConfigurationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_error + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateErrorResponse updateError(UpdateErrorRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateErrorRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateErrorRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateErrorResponse updateError( + Function> fn) + throws IOException, ElasticsearchException { + return updateError(fn.apply(new UpdateErrorRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering + + /** + * Updates the filtering field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateFilteringResponse updateFiltering(UpdateFilteringRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the filtering field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateFilteringResponse updateFiltering( + Function> fn) + throws IOException, ElasticsearchException { + return updateFiltering(fn.apply(new UpdateFilteringRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_filtering_validation + + /** + * Updates the draft filtering validation info for a connector. + * + * @see Documentation + * on elastic.co + */ + + public UpdateFilteringValidationResponse updateFilteringValidation(UpdateFilteringValidationRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateFilteringValidationRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the draft filtering validation info for a connector. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateFilteringValidationRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateFilteringValidationResponse updateFilteringValidation( + Function> fn) + throws IOException, ElasticsearchException { + return updateFilteringValidation(fn.apply(new UpdateFilteringValidationRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_index_name + + /** + * Updates the index_name in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateIndexNameResponse updateIndexName(UpdateIndexNameRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateIndexNameRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the index_name in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateIndexNameRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateIndexNameResponse updateIndexName( + Function> fn) + throws IOException, ElasticsearchException { + return updateIndexName(fn.apply(new UpdateIndexNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_name + + /** + * Updates the name and description fields in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateNameResponse updateName(UpdateNameRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNameRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the name and description fields in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNameRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateNameResponse updateName(Function> fn) + throws IOException, ElasticsearchException { + return updateName(fn.apply(new UpdateNameRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_native + + /** + * Updates the is_native flag in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateNativeResponse updateNative(UpdateNativeRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateNativeRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the is_native flag in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateNativeRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateNativeResponse updateNative( + Function> fn) + throws IOException, ElasticsearchException { + return updateNative(fn.apply(new UpdateNativeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_pipeline + + /** + * Updates the pipeline field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdatePipelineResponse updatePipeline(UpdatePipelineRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdatePipelineRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the pipeline field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdatePipelineRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdatePipelineResponse updatePipeline( + Function> fn) + throws IOException, ElasticsearchException { + return updatePipeline(fn.apply(new UpdatePipelineRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_scheduling + + /** + * Updates the scheduling field in the connector document + * + * @see Documentation + * on elastic.co + */ + + public UpdateSchedulingResponse updateScheduling(UpdateSchedulingRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateSchedulingRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the scheduling field in the connector document + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateSchedulingRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateSchedulingResponse updateScheduling( + Function> fn) + throws IOException, ElasticsearchException { + return updateScheduling(fn.apply(new UpdateSchedulingRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_service_type + + /** + * Updates the service type of the connector + * + * @see Documentation + * on elastic.co + */ + + public UpdateServiceTypeResponse updateServiceType(UpdateServiceTypeRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateServiceTypeRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the service type of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateServiceTypeRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateServiceTypeResponse updateServiceType( + Function> fn) + throws IOException, ElasticsearchException { + return updateServiceType(fn.apply(new UpdateServiceTypeRequest.Builder()).build()); + } + + // ----- Endpoint: connector.update_status + + /** + * Updates the status of the connector + * + * @see Documentation + * on elastic.co + */ + + public UpdateStatusResponse updateStatus(UpdateStatusRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateStatusRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Updates the status of the connector + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateStatusResponse updateStatus( + Function> fn) + throws IOException, ElasticsearchException { + return updateStatus(fn.apply(new UpdateStatusRequest.Builder()).build()); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java new file mode 100644 index 000000000..13d2c8ad6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FeatureEnabled.java @@ -0,0 +1,152 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FeatureEnabled + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FeatureEnabled implements JsonpSerializable { + private final boolean enabled; + + // --------------------------------------------------------------------------------------------- + + private FeatureEnabled(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + + } + + public static FeatureEnabled of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("enabled"); + generator.write(this.enabled); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FeatureEnabled}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Boolean enabled; + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FeatureEnabled}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FeatureEnabled build() { + _checkSingleUse(); + + return new FeatureEnabled(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FeatureEnabled} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FeatureEnabled::setupFeatureEnabledDeserializer); + + protected static void setupFeatureEnabledDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java new file mode 100644 index 000000000..a36839618 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java @@ -0,0 +1,237 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringAdvancedSnippet + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringAdvancedSnippet implements JsonpSerializable { + @Nullable + private final DateTime createdAt; + + @Nullable + private final DateTime updatedAt; + + private final Map value; + + // --------------------------------------------------------------------------------------------- + + private FilteringAdvancedSnippet(Builder builder) { + + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + this.value = ApiTypeHelper.unmodifiableRequired(builder.value, this, "value"); + + } + + public static FilteringAdvancedSnippet of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code created_at} + */ + @Nullable + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * API name: {@code updated_at} + */ + @Nullable + public final DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Required - API name: {@code value} + */ + public final Map value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.createdAt != null) { + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + } + if (this.updatedAt != null) { + generator.writeKey("updated_at"); + this.updatedAt.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.value)) { + generator.writeKey("value"); + generator.writeStartObject(); + for (Map.Entry item0 : this.value.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringAdvancedSnippet}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private DateTime createdAt; + + @Nullable + private DateTime updatedAt; + + private Map value; + + /** + * API name: {@code created_at} + */ + public final Builder createdAt(@Nullable DateTime value) { + this.createdAt = value; + return this; + } + + /** + * API name: {@code updated_at} + */ + public final Builder updatedAt(@Nullable DateTime value) { + this.updatedAt = value; + return this; + } + + /** + * Required - API name: {@code value} + *

+ * Adds all entries of map to value. + */ + public final Builder value(Map map) { + this.value = _mapPutAll(this.value, map); + return this; + } + + /** + * Required - API name: {@code value} + *

+ * Adds an entry to value. + */ + public final Builder value(String key, JsonData value) { + this.value = _mapPut(this.value, key, value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringAdvancedSnippet}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringAdvancedSnippet build() { + _checkSingleUse(); + + return new FilteringAdvancedSnippet(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringAdvancedSnippet} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringAdvancedSnippet::setupFilteringAdvancedSnippetDeserializer); + + protected static void setupFilteringAdvancedSnippetDeserializer( + ObjectDeserializer op) { + + op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); + op.add(Builder::value, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java new file mode 100644 index 000000000..0473fda66 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringConfig.java @@ -0,0 +1,221 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringConfig + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringConfig implements JsonpSerializable { + private final FilteringRules active; + + @Nullable + private final String domain; + + private final FilteringRules draft; + + // --------------------------------------------------------------------------------------------- + + private FilteringConfig(Builder builder) { + + this.active = ApiTypeHelper.requireNonNull(builder.active, this, "active"); + this.domain = builder.domain; + this.draft = ApiTypeHelper.requireNonNull(builder.draft, this, "draft"); + + } + + public static FilteringConfig of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code active} + */ + public final FilteringRules active() { + return this.active; + } + + /** + * API name: {@code domain} + */ + @Nullable + public final String domain() { + return this.domain; + } + + /** + * Required - API name: {@code draft} + */ + public final FilteringRules draft() { + return this.draft; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("active"); + this.active.serialize(generator, mapper); + + if (this.domain != null) { + generator.writeKey("domain"); + generator.write(this.domain); + + } + generator.writeKey("draft"); + this.draft.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringConfig}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private FilteringRules active; + + @Nullable + private String domain; + + private FilteringRules draft; + + /** + * Required - API name: {@code active} + */ + public final Builder active(FilteringRules value) { + this.active = value; + return this; + } + + /** + * Required - API name: {@code active} + */ + public final Builder active(Function> fn) { + return this.active(fn.apply(new FilteringRules.Builder()).build()); + } + + /** + * API name: {@code domain} + */ + public final Builder domain(@Nullable String value) { + this.domain = value; + return this; + } + + /** + * Required - API name: {@code draft} + */ + public final Builder draft(FilteringRules value) { + this.draft = value; + return this; + } + + /** + * Required - API name: {@code draft} + */ + public final Builder draft(Function> fn) { + return this.draft(fn.apply(new FilteringRules.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringConfig}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringConfig build() { + _checkSingleUse(); + + return new FilteringConfig(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringConfig} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringConfig::setupFilteringConfigDeserializer); + + protected static void setupFilteringConfigDeserializer(ObjectDeserializer op) { + + op.add(Builder::active, FilteringRules._DESERIALIZER, "active"); + op.add(Builder::domain, JsonpDeserializer.stringDeserializer(), "domain"); + op.add(Builder::draft, FilteringRules._DESERIALIZER, "draft"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java new file mode 100644 index 000000000..e6c3c5d5f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringPolicy.java @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringPolicy implements JsonEnum { + Exclude("exclude"), + + Include("include"), + + ; + + private final String jsonValue; + + FilteringPolicy(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringPolicy.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java new file mode 100644 index 000000000..5b7431337 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRule.java @@ -0,0 +1,329 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.DateTime; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRule + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRule implements JsonpSerializable { + @Nullable + private final DateTime createdAt; + + private final String field; + + private final String id; + + private final int order; + + private final FilteringPolicy policy; + + private final FilteringRuleRule rule; + + @Nullable + private final DateTime updatedAt; + + private final String value; + + // --------------------------------------------------------------------------------------------- + + private FilteringRule(Builder builder) { + + this.createdAt = builder.createdAt; + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.order = ApiTypeHelper.requireNonNull(builder.order, this, "order"); + this.policy = ApiTypeHelper.requireNonNull(builder.policy, this, "policy"); + this.rule = ApiTypeHelper.requireNonNull(builder.rule, this, "rule"); + this.updatedAt = builder.updatedAt; + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static FilteringRule of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code created_at} + */ + @Nullable + public final DateTime createdAt() { + return this.createdAt; + } + + /** + * Required - API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code order} + */ + public final int order() { + return this.order; + } + + /** + * Required - API name: {@code policy} + */ + public final FilteringPolicy policy() { + return this.policy; + } + + /** + * Required - API name: {@code rule} + */ + public final FilteringRuleRule rule() { + return this.rule; + } + + /** + * API name: {@code updated_at} + */ + @Nullable + public final DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Required - API name: {@code value} + */ + public final String value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.createdAt != null) { + generator.writeKey("created_at"); + this.createdAt.serialize(generator, mapper); + } + generator.writeKey("field"); + generator.write(this.field); + + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("order"); + generator.write(this.order); + + generator.writeKey("policy"); + this.policy.serialize(generator, mapper); + generator.writeKey("rule"); + this.rule.serialize(generator, mapper); + if (this.updatedAt != null) { + generator.writeKey("updated_at"); + this.updatedAt.serialize(generator, mapper); + } + generator.writeKey("value"); + generator.write(this.value); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRule}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private DateTime createdAt; + + private String field; + + private String id; + + private Integer order; + + private FilteringPolicy policy; + + private FilteringRuleRule rule; + + @Nullable + private DateTime updatedAt; + + private String value; + + /** + * API name: {@code created_at} + */ + public final Builder createdAt(@Nullable DateTime value) { + this.createdAt = value; + return this; + } + + /** + * Required - API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - API name: {@code order} + */ + public final Builder order(int value) { + this.order = value; + return this; + } + + /** + * Required - API name: {@code policy} + */ + public final Builder policy(FilteringPolicy value) { + this.policy = value; + return this; + } + + /** + * Required - API name: {@code rule} + */ + public final Builder rule(FilteringRuleRule value) { + this.rule = value; + return this; + } + + /** + * API name: {@code updated_at} + */ + public final Builder updatedAt(@Nullable DateTime value) { + this.updatedAt = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRule}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRule build() { + _checkSingleUse(); + + return new FilteringRule(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRule} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringRule::setupFilteringRuleDeserializer); + + protected static void setupFilteringRuleDeserializer(ObjectDeserializer op) { + + op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::order, JsonpDeserializer.integerDeserializer(), "order"); + op.add(Builder::policy, FilteringPolicy._DESERIALIZER, "policy"); + op.add(Builder::rule, FilteringRuleRule._DESERIALIZER, "rule"); + op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); + op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java new file mode 100644 index 000000000..fe34e7223 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRuleRule.java @@ -0,0 +1,77 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringRuleRule implements JsonEnum { + Contains("contains"), + + EndsWith("ends_with"), + + Equals("equals"), + + Regex("regex"), + + StartsWith("starts_with"), + + GreaterThan(">"), + + LessThan("<"), + + ; + + private final String jsonValue; + + FilteringRuleRule(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringRuleRule.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java new file mode 100644 index 000000000..577602f7c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRules.java @@ -0,0 +1,245 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRules + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRules implements JsonpSerializable { + private final FilteringAdvancedSnippet advancedSnippet; + + private final List rules; + + private final FilteringRulesValidation validation; + + // --------------------------------------------------------------------------------------------- + + private FilteringRules(Builder builder) { + + this.advancedSnippet = ApiTypeHelper.requireNonNull(builder.advancedSnippet, this, "advancedSnippet"); + this.rules = ApiTypeHelper.unmodifiableRequired(builder.rules, this, "rules"); + this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); + + } + + public static FilteringRules of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code advanced_snippet} + */ + public final FilteringAdvancedSnippet advancedSnippet() { + return this.advancedSnippet; + } + + /** + * Required - API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + + /** + * Required - API name: {@code validation} + */ + public final FilteringRulesValidation validation() { + return this.validation; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("advanced_snippet"); + this.advancedSnippet.serialize(generator, mapper); + + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (FilteringRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("validation"); + this.validation.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRules}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private FilteringAdvancedSnippet advancedSnippet; + + private List rules; + + private FilteringRulesValidation validation; + + /** + * Required - API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet(FilteringAdvancedSnippet value) { + this.advancedSnippet = value; + return this; + } + + /** + * Required - API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet( + Function> fn) { + return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); + } + + /** + * Required - API name: {@code rules} + *

+ * Adds all elements of list to rules. + */ + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); + return this; + } + + /** + * Required - API name: {@code rules} + *

+ * Adds one or more values to rules. + */ + public final Builder rules(FilteringRule value, FilteringRule... values) { + this.rules = _listAdd(this.rules, value, values); + return this; + } + + /** + * Required - API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. + */ + public final Builder rules(Function> fn) { + return rules(fn.apply(new FilteringRule.Builder()).build()); + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation(FilteringRulesValidation value) { + this.validation = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation( + Function> fn) { + return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRules}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRules build() { + _checkSingleUse(); + + return new FilteringRules(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRules} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FilteringRules::setupFilteringRulesDeserializer); + + protected static void setupFilteringRulesDeserializer(ObjectDeserializer op) { + + op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); + op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java new file mode 100644 index 000000000..ca7c7f02f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringRulesValidation.java @@ -0,0 +1,209 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringRulesValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringRulesValidation implements JsonpSerializable { + private final List errors; + + private final FilteringValidationState state; + + // --------------------------------------------------------------------------------------------- + + private FilteringRulesValidation(Builder builder) { + + this.errors = ApiTypeHelper.unmodifiableRequired(builder.errors, this, "errors"); + this.state = ApiTypeHelper.requireNonNull(builder.state, this, "state"); + + } + + public static FilteringRulesValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code errors} + */ + public final List errors() { + return this.errors; + } + + /** + * Required - API name: {@code state} + */ + public final FilteringValidationState state() { + return this.state; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.errors)) { + generator.writeKey("errors"); + generator.writeStartArray(); + for (FilteringValidation item0 : this.errors) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("state"); + this.state.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringRulesValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List errors; + + private FilteringValidationState state; + + /** + * Required - API name: {@code errors} + *

+ * Adds all elements of list to errors. + */ + public final Builder errors(List list) { + this.errors = _listAddAll(this.errors, list); + return this; + } + + /** + * Required - API name: {@code errors} + *

+ * Adds one or more values to errors. + */ + public final Builder errors(FilteringValidation value, FilteringValidation... values) { + this.errors = _listAdd(this.errors, value, values); + return this; + } + + /** + * Required - API name: {@code errors} + *

+ * Adds a value to errors using a builder lambda. + */ + public final Builder errors(Function> fn) { + return errors(fn.apply(new FilteringValidation.Builder()).build()); + } + + /** + * Required - API name: {@code state} + */ + public final Builder state(FilteringValidationState value) { + this.state = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringRulesValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringRulesValidation build() { + _checkSingleUse(); + + return new FilteringRulesValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringRulesValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringRulesValidation::setupFilteringRulesValidationDeserializer); + + protected static void setupFilteringRulesValidationDeserializer( + ObjectDeserializer op) { + + op.add(Builder::errors, JsonpDeserializer.arrayDeserializer(FilteringValidation._DESERIALIZER), "errors"); + op.add(Builder::state, FilteringValidationState._DESERIALIZER, "state"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java new file mode 100644 index 000000000..b97f661e2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidation.java @@ -0,0 +1,221 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.FilteringValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FilteringValidation implements JsonpSerializable { + private final List ids; + + private final List messages; + + // --------------------------------------------------------------------------------------------- + + private FilteringValidation(Builder builder) { + + this.ids = ApiTypeHelper.unmodifiableRequired(builder.ids, this, "ids"); + this.messages = ApiTypeHelper.unmodifiableRequired(builder.messages, this, "messages"); + + } + + public static FilteringValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code ids} + */ + public final List ids() { + return this.ids; + } + + /** + * Required - API name: {@code messages} + */ + public final List messages() { + return this.messages; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.ids)) { + generator.writeKey("ids"); + generator.writeStartArray(); + for (String item0 : this.ids) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.messages)) { + generator.writeKey("messages"); + generator.writeStartArray(); + for (String item0 : this.messages) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FilteringValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List ids; + + private List messages; + + /** + * Required - API name: {@code ids} + *

+ * Adds all elements of list to ids. + */ + public final Builder ids(List list) { + this.ids = _listAddAll(this.ids, list); + return this; + } + + /** + * Required - API name: {@code ids} + *

+ * Adds one or more values to ids. + */ + public final Builder ids(String value, String... values) { + this.ids = _listAdd(this.ids, value, values); + return this; + } + + /** + * Required - API name: {@code messages} + *

+ * Adds all elements of list to messages. + */ + public final Builder messages(List list) { + this.messages = _listAddAll(this.messages, list); + return this; + } + + /** + * Required - API name: {@code messages} + *

+ * Adds one or more values to messages. + */ + public final Builder messages(String value, String... values) { + this.messages = _listAdd(this.messages, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FilteringValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FilteringValidation build() { + _checkSingleUse(); + + return new FilteringValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FilteringValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FilteringValidation::setupFilteringValidationDeserializer); + + protected static void setupFilteringValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::ids, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "ids"); + op.add(Builder::messages, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "messages"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java new file mode 100644 index 000000000..1111f24d1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringValidationState.java @@ -0,0 +1,69 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum FilteringValidationState implements JsonEnum { + Edited("edited"), + + Invalid("invalid"), + + Valid("valid"), + + ; + + private final String jsonValue; + + FilteringValidationState(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + FilteringValidationState.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java new file mode 100644 index 000000000..9d9cd9328 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java @@ -0,0 +1,181 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.get.Request + +/** + * Retrieves a connector. + * + * @see API + * specification + */ + +public class GetConnectorRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private GetConnectorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static GetConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetConnectorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetConnectorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetConnectorRequest build() { + _checkSingleUse(); + + return new GetConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.get}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.get", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, GetConnectorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java new file mode 100644 index 000000000..d4b9fc44a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorResponse.java @@ -0,0 +1,106 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.get.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GetConnectorResponse extends Connector { + // --------------------------------------------------------------------------------------------- + + private GetConnectorResponse(Builder builder) { + super(builder); + + } + + public static GetConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetConnectorResponse}. + */ + + public static class Builder extends Connector.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetConnectorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetConnectorResponse build() { + _checkSingleUse(); + + return new GetConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, GetConnectorResponse::setupGetConnectorResponseDeserializer); + + protected static void setupGetConnectorResponseDeserializer(ObjectDeserializer op) { + Connector.setupConnectorDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java new file mode 100644 index 000000000..44e5bb722 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/GreaterThanValidation.java @@ -0,0 +1,166 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Double; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.GreaterThanValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GreaterThanValidation implements ValidationVariant, JsonpSerializable { + private final double constraint; + + // --------------------------------------------------------------------------------------------- + + private GreaterThanValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static GreaterThanValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.GreaterThan; + } + + /** + * Required - API name: {@code constraint} + */ + public final double constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "greater_than"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GreaterThanValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Double constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(double value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GreaterThanValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GreaterThanValidation build() { + _checkSingleUse(); + + return new GreaterThanValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GreaterThanValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, GreaterThanValidation::setupGreaterThanValidationDeserializer); + + protected static void setupGreaterThanValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java new file mode 100644 index 000000000..2046e5d48 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IncludedInValidation.java @@ -0,0 +1,197 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.IncludedInValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IncludedInValidation implements ValidationVariant, JsonpSerializable { + private final List constraint; + + // --------------------------------------------------------------------------------------------- + + private IncludedInValidation(Builder builder) { + + this.constraint = ApiTypeHelper.unmodifiableRequired(builder.constraint, this, "constraint"); + + } + + public static IncludedInValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.IncludedIn; + } + + /** + * Required - API name: {@code constraint} + */ + public final List constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "included_in"); + + if (ApiTypeHelper.isDefined(this.constraint)) { + generator.writeKey("constraint"); + generator.writeStartArray(); + for (FieldValue item0 : this.constraint) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IncludedInValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List constraint; + + /** + * Required - API name: {@code constraint} + *

+ * Adds all elements of list to constraint. + */ + public final Builder constraint(List list) { + this.constraint = _listAddAll(this.constraint, list); + return this; + } + + /** + * Required - API name: {@code constraint} + *

+ * Adds one or more values to constraint. + */ + public final Builder constraint(FieldValue value, FieldValue... values) { + this.constraint = _listAdd(this.constraint, value, values); + return this; + } + + /** + * Required - API name: {@code constraint} + *

+ * Adds a value to constraint using a builder lambda. + */ + public final Builder constraint(Function> fn) { + return constraint(fn.apply(new FieldValue.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IncludedInValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IncludedInValidation build() { + _checkSingleUse(); + + return new IncludedInValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IncludedInValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IncludedInValidation::setupIncludedInValidationDeserializer); + + protected static void setupIncludedInValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java new file mode 100644 index 000000000..d6ae02a2b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/IngestPipelineParams.java @@ -0,0 +1,230 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.IngestPipelineParams + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IngestPipelineParams implements JsonpSerializable { + private final boolean extractBinaryContent; + + private final String name; + + private final boolean reduceWhitespace; + + private final boolean runMlInference; + + // --------------------------------------------------------------------------------------------- + + private IngestPipelineParams(Builder builder) { + + this.extractBinaryContent = ApiTypeHelper.requireNonNull(builder.extractBinaryContent, this, + "extractBinaryContent"); + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.reduceWhitespace = ApiTypeHelper.requireNonNull(builder.reduceWhitespace, this, "reduceWhitespace"); + this.runMlInference = ApiTypeHelper.requireNonNull(builder.runMlInference, this, "runMlInference"); + + } + + public static IngestPipelineParams of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code extract_binary_content} + */ + public final boolean extractBinaryContent() { + return this.extractBinaryContent; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - API name: {@code reduce_whitespace} + */ + public final boolean reduceWhitespace() { + return this.reduceWhitespace; + } + + /** + * Required - API name: {@code run_ml_inference} + */ + public final boolean runMlInference() { + return this.runMlInference; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("extract_binary_content"); + generator.write(this.extractBinaryContent); + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("reduce_whitespace"); + generator.write(this.reduceWhitespace); + + generator.writeKey("run_ml_inference"); + generator.write(this.runMlInference); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IngestPipelineParams}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean extractBinaryContent; + + private String name; + + private Boolean reduceWhitespace; + + private Boolean runMlInference; + + /** + * Required - API name: {@code extract_binary_content} + */ + public final Builder extractBinaryContent(boolean value) { + this.extractBinaryContent = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - API name: {@code reduce_whitespace} + */ + public final Builder reduceWhitespace(boolean value) { + this.reduceWhitespace = value; + return this; + } + + /** + * Required - API name: {@code run_ml_inference} + */ + public final Builder runMlInference(boolean value) { + this.runMlInference = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IngestPipelineParams}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IngestPipelineParams build() { + _checkSingleUse(); + + return new IngestPipelineParams(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IngestPipelineParams} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IngestPipelineParams::setupIngestPipelineParamsDeserializer); + + protected static void setupIngestPipelineParamsDeserializer(ObjectDeserializer op) { + + op.add(Builder::extractBinaryContent, JsonpDeserializer.booleanDeserializer(), "extract_binary_content"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::reduceWhitespace, JsonpDeserializer.booleanDeserializer(), "reduce_whitespace"); + op.add(Builder::runMlInference, JsonpDeserializer.booleanDeserializer(), "run_ml_inference"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java new file mode 100644 index 000000000..8ea89d561 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/LessThanValidation.java @@ -0,0 +1,166 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Double; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.LessThanValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LessThanValidation implements ValidationVariant, JsonpSerializable { + private final double constraint; + + // --------------------------------------------------------------------------------------------- + + private LessThanValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static LessThanValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.LessThan; + } + + /** + * Required - API name: {@code constraint} + */ + public final double constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "less_than"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LessThanValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Double constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(double value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LessThanValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LessThanValidation build() { + _checkSingleUse(); + + return new LessThanValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LessThanValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LessThanValidation::setupLessThanValidationDeserializer); + + protected static void setupLessThanValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.doubleDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java new file mode 100644 index 000000000..c290e19f7 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java @@ -0,0 +1,362 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.list.Request + +/** + * Returns existing connectors. + * + * @see API + * specification + */ + +public class ListRequest extends RequestBase { + private final List connectorName; + + @Nullable + private final Integer from; + + private final List indexName; + + @Nullable + private final String query; + + private final List serviceType; + + @Nullable + private final Integer size; + + // --------------------------------------------------------------------------------------------- + + private ListRequest(Builder builder) { + + this.connectorName = ApiTypeHelper.unmodifiable(builder.connectorName); + this.from = builder.from; + this.indexName = ApiTypeHelper.unmodifiable(builder.indexName); + this.query = builder.query; + this.serviceType = ApiTypeHelper.unmodifiable(builder.serviceType); + this.size = builder.size; + + } + + public static ListRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + */ + public final List connectorName() { + return this.connectorName; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + @Nullable + public final Integer from() { + return this.from; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + */ + public final List indexName() { + return this.indexName; + } + + /** + * A wildcard query string that filters connectors with matching name, + * description or index name + *

+ * API name: {@code query} + */ + @Nullable + public final String query() { + return this.query; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + */ + public final List serviceType() { + return this.serviceType; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private List connectorName; + + @Nullable + private Integer from; + + @Nullable + private List indexName; + + @Nullable + private String query; + + @Nullable + private List serviceType; + + @Nullable + private Integer size; + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + *

+ * Adds all elements of list to connectorName. + */ + public final Builder connectorName(List list) { + this.connectorName = _listAddAll(this.connectorName, list); + return this; + } + + /** + * A comma-separated list of connector names to fetch connector documents for + *

+ * API name: {@code connector_name} + *

+ * Adds one or more values to connectorName. + */ + public final Builder connectorName(String value, String... values) { + this.connectorName = _listAdd(this.connectorName, value, values); + return this; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + public final Builder from(@Nullable Integer value) { + this.from = value; + return this; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + *

+ * Adds all elements of list to indexName. + */ + public final Builder indexName(List list) { + this.indexName = _listAddAll(this.indexName, list); + return this; + } + + /** + * A comma-separated list of connector index names to fetch connector documents + * for + *

+ * API name: {@code index_name} + *

+ * Adds one or more values to indexName. + */ + public final Builder indexName(String value, String... values) { + this.indexName = _listAdd(this.indexName, value, values); + return this; + } + + /** + * A wildcard query string that filters connectors with matching name, + * description or index name + *

+ * API name: {@code query} + */ + public final Builder query(@Nullable String value) { + this.query = value; + return this; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + *

+ * Adds all elements of list to serviceType. + */ + public final Builder serviceType(List list) { + this.serviceType = _listAddAll(this.serviceType, list); + return this; + } + + /** + * A comma-separated list of connector service types to fetch connector + * documents for + *

+ * API name: {@code service_type} + *

+ * Adds one or more values to serviceType. + */ + public final Builder serviceType(String value, String... values) { + this.serviceType = _listAdd(this.serviceType, value, values); + return this; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + public final Builder size(@Nullable Integer value) { + this.size = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListRequest build() { + _checkSingleUse(); + + return new ListRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.list}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.list", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_connector"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (ApiTypeHelper.isDefined(request.serviceType)) { + params.put("service_type", + request.serviceType.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (request.size != null) { + params.put("size", String.valueOf(request.size)); + } + if (request.query != null) { + params.put("query", request.query); + } + if (request.from != null) { + params.put("from", String.valueOf(request.from)); + } + if (ApiTypeHelper.isDefined(request.connectorName)) { + params.put("connector_name", + request.connectorName.stream().map(v -> v).collect(Collectors.joining(","))); + } + if (ApiTypeHelper.isDefined(request.indexName)) { + params.put("index_name", request.indexName.stream().map(v -> v).collect(Collectors.joining(","))); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, ListResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java new file mode 100644 index 000000000..fab2f74c1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListResponse.java @@ -0,0 +1,207 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.list.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ListResponse implements JsonpSerializable { + private final long count; + + private final List results; + + // --------------------------------------------------------------------------------------------- + + private ListResponse(Builder builder) { + + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); + this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); + + } + + public static ListResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } + + /** + * Required - API name: {@code results} + */ + public final List results() { + return this.results; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("count"); + generator.write(this.count); + + if (ApiTypeHelper.isDefined(this.results)) { + generator.writeKey("results"); + generator.writeStartArray(); + for (Connector item0 : this.results) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Long count; + + private List results; + + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds all elements of list to results. + */ + public final Builder results(List list) { + this.results = _listAddAll(this.results, list); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds one or more values to results. + */ + public final Builder results(Connector value, Connector... values) { + this.results = _listAdd(this.results, value, values); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds a value to results using a builder lambda. + */ + public final Builder results(Function> fn) { + return results(fn.apply(new Connector.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListResponse build() { + _checkSingleUse(); + + return new ListResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ListResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ListResponse::setupListResponseDeserializer); + + protected static void setupListResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::results, JsonpDeserializer.arrayDeserializer(Connector._DESERIALIZER), "results"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java new file mode 100644 index 000000000..96b0cbfb6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ListTypeValidation.java @@ -0,0 +1,167 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.ListTypeValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ListTypeValidation implements ValidationVariant, JsonpSerializable { + private final String constraint; + + // --------------------------------------------------------------------------------------------- + + private ListTypeValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static ListTypeValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.ListType; + } + + /** + * Required - API name: {@code constraint} + */ + public final String constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "list_type"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListTypeValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(String value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListTypeValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListTypeValidation build() { + _checkSingleUse(); + + return new ListTypeValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ListTypeValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ListTypeValidation::setupListTypeValidationDeserializer); + + protected static void setupListTypeValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java new file mode 100644 index 000000000..2f34ed80d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java @@ -0,0 +1,333 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.post.Request + +/** + * Creates a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class PostRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String description; + + @Nullable + private final String indexName; + + @Nullable + private final Boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String name; + + @Nullable + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private PostRequest(Builder builder) { + + this.description = builder.description; + this.indexName = builder.indexName; + this.isNative = builder.isNative; + this.language = builder.language; + this.name = builder.name; + this.serviceType = builder.serviceType; + + } + + public static PostRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code is_native} + */ + @Nullable + public final Boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + if (this.isNative != null) { + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PostRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String description; + + @Nullable + private String indexName; + + @Nullable + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String name; + + @Nullable + private String serviceType; + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code index_name} + */ + public final Builder indexName(@Nullable String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code is_native} + */ + public final Builder isNative(@Nullable Boolean value) { + this.isNative = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * API name: {@code service_type} + */ + public final Builder serviceType(@Nullable String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PostRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PostRequest build() { + _checkSingleUse(); + + return new PostRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PostRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PostRequest::setupPostRequestDeserializer); + + protected static void setupPostRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.post}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.post", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_connector"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, PostResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java new file mode 100644 index 000000000..bbd2ca0e8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PostResponse.java @@ -0,0 +1,177 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.post.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PostResponse implements JsonpSerializable { + private final Result result; + + private final String id; + + // --------------------------------------------------------------------------------------------- + + private PostResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static PostResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PostResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + private String id; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PostResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PostResponse build() { + _checkSingleUse(); + + return new PostResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PostResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PostResponse::setupPostResponseDeserializer); + + protected static void setupPostResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java new file mode 100644 index 000000000..49ca6b6b2 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java @@ -0,0 +1,396 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.put.Request + +/** + * Creates or updates a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String connectorId; + + @Nullable + private final String description; + + @Nullable + private final String indexName; + + @Nullable + private final Boolean isNative; + + @Nullable + private final String language; + + @Nullable + private final String name; + + @Nullable + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private PutRequest(Builder builder) { + + this.connectorId = builder.connectorId; + this.description = builder.description; + this.indexName = builder.indexName; + this.isNative = builder.isNative; + this.language = builder.language; + this.name = builder.name; + this.serviceType = builder.serviceType; + + } + + public static PutRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The unique identifier of the connector to be created or updated. ID is + * auto-generated if not provided. + *

+ * API name: {@code connector_id} + */ + @Nullable + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code index_name} + */ + @Nullable + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code is_native} + */ + @Nullable + public final Boolean isNative() { + return this.isNative; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code service_type} + */ + @Nullable + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.indexName != null) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + if (this.isNative != null) { + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + if (this.serviceType != null) { + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String connectorId; + + @Nullable + private String description; + + @Nullable + private String indexName; + + @Nullable + private Boolean isNative; + + @Nullable + private String language; + + @Nullable + private String name; + + @Nullable + private String serviceType; + + /** + * The unique identifier of the connector to be created or updated. ID is + * auto-generated if not provided. + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(@Nullable String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code index_name} + */ + public final Builder indexName(@Nullable String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code is_native} + */ + public final Builder isNative(@Nullable Boolean value) { + this.isNative = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * API name: {@code service_type} + */ + public final Builder serviceType(@Nullable String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutRequest build() { + _checkSingleUse(); + + return new PutRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutRequest::setupPutRequestDeserializer); + + protected static void setupPutRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.put}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.put", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + if (request.connectorId() != null) + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + } + if (propsSet == 0) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + if (request.connectorId() != null) + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + if (propsSet == 0) { + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, PutResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java new file mode 100644 index 000000000..ddc5ee768 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/PutResponse.java @@ -0,0 +1,177 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.put.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PutResponse implements JsonpSerializable { + private final Result result; + + private final String id; + + // --------------------------------------------------------------------------------------------- + + private PutResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static PutResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PutResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Result result; + + private String id; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PutResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PutResponse build() { + _checkSingleUse(); + + return new PutResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PutResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PutResponse::setupPutResponseDeserializer); + + protected static void setupPutResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java new file mode 100644 index 000000000..ac3f410ba --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/RegexValidation.java @@ -0,0 +1,165 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.RegexValidation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RegexValidation implements ValidationVariant, JsonpSerializable { + private final String constraint; + + // --------------------------------------------------------------------------------------------- + + private RegexValidation(Builder builder) { + + this.constraint = ApiTypeHelper.requireNonNull(builder.constraint, this, "constraint"); + + } + + public static RegexValidation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Validation variant kind. + */ + @Override + public Validation.Kind _validationKind() { + return Validation.Kind.Regex; + } + + /** + * Required - API name: {@code constraint} + */ + public final String constraint() { + return this.constraint; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.write("type", "regex"); + + generator.writeKey("constraint"); + generator.write(this.constraint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RegexValidation}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String constraint; + + /** + * Required - API name: {@code constraint} + */ + public final Builder constraint(String value) { + this.constraint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RegexValidation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RegexValidation build() { + _checkSingleUse(); + + return new RegexValidation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RegexValidation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RegexValidation::setupRegexValidationDeserializer); + + protected static void setupRegexValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::constraint, JsonpDeserializer.stringDeserializer(), "constraint"); + + op.ignore("type"); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java new file mode 100644 index 000000000..8de91e1b3 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SchedulingConfiguration.java @@ -0,0 +1,241 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SchedulingConfiguration + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SchedulingConfiguration implements JsonpSerializable { + @Nullable + private final ConnectorScheduling accessControl; + + @Nullable + private final ConnectorScheduling full; + + @Nullable + private final ConnectorScheduling incremental; + + // --------------------------------------------------------------------------------------------- + + private SchedulingConfiguration(Builder builder) { + + this.accessControl = builder.accessControl; + this.full = builder.full; + this.incremental = builder.incremental; + + } + + public static SchedulingConfiguration of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code access_control} + */ + @Nullable + public final ConnectorScheduling accessControl() { + return this.accessControl; + } + + /** + * API name: {@code full} + */ + @Nullable + public final ConnectorScheduling full() { + return this.full; + } + + /** + * API name: {@code incremental} + */ + @Nullable + public final ConnectorScheduling incremental() { + return this.incremental; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.accessControl != null) { + generator.writeKey("access_control"); + this.accessControl.serialize(generator, mapper); + + } + if (this.full != null) { + generator.writeKey("full"); + this.full.serialize(generator, mapper); + + } + if (this.incremental != null) { + generator.writeKey("incremental"); + this.incremental.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SchedulingConfiguration}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private ConnectorScheduling accessControl; + + @Nullable + private ConnectorScheduling full; + + @Nullable + private ConnectorScheduling incremental; + + /** + * API name: {@code access_control} + */ + public final Builder accessControl(@Nullable ConnectorScheduling value) { + this.accessControl = value; + return this; + } + + /** + * API name: {@code access_control} + */ + public final Builder accessControl( + Function> fn) { + return this.accessControl(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + /** + * API name: {@code full} + */ + public final Builder full(@Nullable ConnectorScheduling value) { + this.full = value; + return this; + } + + /** + * API name: {@code full} + */ + public final Builder full(Function> fn) { + return this.full(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + /** + * API name: {@code incremental} + */ + public final Builder incremental(@Nullable ConnectorScheduling value) { + this.incremental = value; + return this; + } + + /** + * API name: {@code incremental} + */ + public final Builder incremental(Function> fn) { + return this.incremental(fn.apply(new ConnectorScheduling.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SchedulingConfiguration}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SchedulingConfiguration build() { + _checkSingleUse(); + + return new SchedulingConfiguration(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SchedulingConfiguration} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SchedulingConfiguration::setupSchedulingConfigurationDeserializer); + + protected static void setupSchedulingConfigurationDeserializer( + ObjectDeserializer op) { + + op.add(Builder::accessControl, ConnectorScheduling._DESERIALIZER, "access_control"); + op.add(Builder::full, ConnectorScheduling._DESERIALIZER, "full"); + op.add(Builder::incremental, ConnectorScheduling._DESERIALIZER, "incremental"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java new file mode 100644 index 000000000..18b2c3e1d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SelectOption.java @@ -0,0 +1,217 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.FieldValue; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SelectOption + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SelectOption implements JsonpSerializable { + private final String label; + + private final FieldValue value; + + // --------------------------------------------------------------------------------------------- + + private SelectOption(Builder builder) { + + this.label = ApiTypeHelper.requireNonNull(builder.label, this, "label"); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static SelectOption of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code label} + */ + public final String label() { + return this.label; + } + + /** + * Required - API name: {@code value} + */ + public final FieldValue value() { + return this.value; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("label"); + generator.write(this.label); + + generator.writeKey("value"); + this.value.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SelectOption}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String label; + + private FieldValue value; + + /** + * Required - API name: {@code label} + */ + public final Builder label(String value) { + this.label = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(FieldValue value) { + this.value = value; + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(Function> fn) { + return this.value(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(String value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(long value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(double value) { + this.value = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code value} + */ + public final Builder value(boolean value) { + this.value = FieldValue.of(value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SelectOption}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SelectOption build() { + _checkSingleUse(); + + return new SelectOption(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SelectOption} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SelectOption::setupSelectOptionDeserializer); + + protected static void setupSelectOptionDeserializer(ObjectDeserializer op) { + + op.add(Builder::label, JsonpDeserializer.stringDeserializer(), "label"); + op.add(Builder::value, FieldValue._DESERIALIZER, "value"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java new file mode 100644 index 000000000..d87926d47 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java @@ -0,0 +1,184 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_cancel.Request + +/** + * Cancels a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobCancelRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobCancelRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobCancelRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobCancelRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobCancelRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobCancelRequest build() { + _checkSingleUse(); + + return new SyncJobCancelRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_cancel}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_cancel", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + buf.append("/_cancel"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobCancelResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java new file mode 100644 index 000000000..d3a36d231 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_cancel.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobCancelResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private SyncJobCancelResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static SyncJobCancelResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobCancelResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobCancelResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobCancelResponse build() { + _checkSingleUse(); + + return new SyncJobCancelResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobCancelResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobCancelResponse::setupSyncJobCancelResponseDeserializer); + + protected static void setupSyncJobCancelResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java new file mode 100644 index 000000000..63da62e44 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobConnectorReference.java @@ -0,0 +1,388 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SyncJobConnectorReference + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobConnectorReference implements JsonpSerializable { + private final Map configuration; + + private final FilteringRules filtering; + + private final String id; + + private final String indexName; + + @Nullable + private final String language; + + @Nullable + private final IngestPipelineParams pipeline; + + private final String serviceType; + + @Nullable + private final JsonData syncCursor; + + // --------------------------------------------------------------------------------------------- + + private SyncJobConnectorReference(Builder builder) { + + this.configuration = ApiTypeHelper.unmodifiableRequired(builder.configuration, this, "configuration"); + this.filtering = ApiTypeHelper.requireNonNull(builder.filtering, this, "filtering"); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.indexName = ApiTypeHelper.requireNonNull(builder.indexName, this, "indexName"); + this.language = builder.language; + this.pipeline = builder.pipeline; + this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); + this.syncCursor = builder.syncCursor; + + } + + public static SyncJobConnectorReference of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - API name: {@code filtering} + */ + public final FilteringRules filtering() { + return this.filtering; + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - API name: {@code index_name} + */ + public final String indexName() { + return this.indexName; + } + + /** + * API name: {@code language} + */ + @Nullable + public final String language() { + return this.language; + } + + /** + * API name: {@code pipeline} + */ + @Nullable + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Required - API name: {@code service_type} + */ + public final String serviceType() { + return this.serviceType; + } + + /** + * API name: {@code sync_cursor} + */ + @Nullable + public final JsonData syncCursor() { + return this.syncCursor; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("filtering"); + this.filtering.serialize(generator, mapper); + + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("index_name"); + generator.write(this.indexName); + + if (this.language != null) { + generator.writeKey("language"); + generator.write(this.language); + + } + if (this.pipeline != null) { + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + generator.writeKey("service_type"); + generator.write(this.serviceType); + + if (this.syncCursor != null) { + generator.writeKey("sync_cursor"); + this.syncCursor.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobConnectorReference}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Map configuration; + + private FilteringRules filtering; + + private String id; + + private String indexName; + + @Nullable + private String language; + + @Nullable + private IngestPipelineParams pipeline; + + private String serviceType; + + @Nullable + private JsonData syncCursor; + + /** + * Required - API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final Builder configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return this; + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final Builder configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return this; + } + + /** + * Required - API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final Builder configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - API name: {@code filtering} + */ + public final Builder filtering(FilteringRules value) { + this.filtering = value; + return this; + } + + /** + * Required - API name: {@code filtering} + */ + public final Builder filtering(Function> fn) { + return this.filtering(fn.apply(new FilteringRules.Builder()).build()); + } + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexName(String value) { + this.indexName = value; + return this; + } + + /** + * API name: {@code language} + */ + public final Builder language(@Nullable String value) { + this.language = value; + return this; + } + + /** + * API name: {@code pipeline} + */ + public final Builder pipeline(@Nullable IngestPipelineParams value) { + this.pipeline = value; + return this; + } + + /** + * API name: {@code pipeline} + */ + public final Builder pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + /** + * Required - API name: {@code service_type} + */ + public final Builder serviceType(String value) { + this.serviceType = value; + return this; + } + + /** + * API name: {@code sync_cursor} + */ + public final Builder syncCursor(@Nullable JsonData value) { + this.syncCursor = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobConnectorReference}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobConnectorReference build() { + _checkSingleUse(); + + return new SyncJobConnectorReference(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobConnectorReference} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobConnectorReference::setupSyncJobConnectorReferenceDeserializer); + + protected static void setupSyncJobConnectorReferenceDeserializer( + ObjectDeserializer op) { + + op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), + "configuration"); + op.add(Builder::filtering, FilteringRules._DESERIALIZER, "filtering"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + op.add(Builder::language, JsonpDeserializer.stringDeserializer(), "language"); + op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + op.add(Builder::syncCursor, JsonData._DESERIALIZER, "sync_cursor"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java new file mode 100644 index 000000000..7fabf48c1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java @@ -0,0 +1,183 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_delete.Request + +/** + * Deletes a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobDeleteRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobDeleteRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobDeleteRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job to be deleted + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobDeleteRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job to be deleted + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobDeleteRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobDeleteRequest build() { + _checkSingleUse(); + + return new SyncJobDeleteRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_delete}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_delete", + + // Request method + request -> { + return "DELETE"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobDeleteResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java new file mode 100644 index 000000000..95b7a101b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteResponse.java @@ -0,0 +1,108 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_delete.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobDeleteResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private SyncJobDeleteResponse(Builder builder) { + super(builder); + + } + + public static SyncJobDeleteResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobDeleteResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobDeleteResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobDeleteResponse build() { + _checkSingleUse(); + + return new SyncJobDeleteResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobDeleteResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobDeleteResponse::setupSyncJobDeleteResponseDeserializer); + + protected static void setupSyncJobDeleteResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java new file mode 100644 index 000000000..16bb24995 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java @@ -0,0 +1,182 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_get.Request + +/** + * Retrieves a connector sync job. + * + * @see API + * specification + */ + +public class SyncJobGetRequest extends RequestBase { + private final String connectorSyncJobId; + + // --------------------------------------------------------------------------------------------- + + private SyncJobGetRequest(Builder builder) { + + this.connectorSyncJobId = ApiTypeHelper.requireNonNull(builder.connectorSyncJobId, this, "connectorSyncJobId"); + + } + + public static SyncJobGetRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final String connectorSyncJobId() { + return this.connectorSyncJobId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobGetRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorSyncJobId; + + /** + * Required - The unique identifier of the connector sync job + *

+ * API name: {@code connector_sync_job_id} + */ + public final Builder connectorSyncJobId(String value) { + this.connectorSyncJobId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobGetRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobGetRequest build() { + _checkSingleUse(); + + return new SyncJobGetRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_get}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_get", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/_sync_job"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorSyncJobId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorSyncJobId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorSyncJobId; + + if (propsSet == (_connectorSyncJobId)) { + params.put("connectorSyncJobId", request.connectorSyncJobId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, SyncJobGetResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java new file mode 100644 index 000000000..510cc6257 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetResponse.java @@ -0,0 +1,106 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_get.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobGetResponse extends ConnectorSyncJob { + // --------------------------------------------------------------------------------------------- + + private SyncJobGetResponse(Builder builder) { + super(builder); + + } + + public static SyncJobGetResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobGetResponse}. + */ + + public static class Builder extends ConnectorSyncJob.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobGetResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobGetResponse build() { + _checkSingleUse(); + + return new SyncJobGetResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobGetResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobGetResponse::setupSyncJobGetResponseDeserializer); + + protected static void setupSyncJobGetResponseDeserializer(ObjectDeserializer op) { + ConnectorSyncJob.setupConnectorSyncJobDeserializer(op); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java new file mode 100644 index 000000000..884e96a94 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java @@ -0,0 +1,301 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_list.Request + +/** + * Lists connector sync jobs. + * + * @see API + * specification + */ + +public class SyncJobListRequest extends RequestBase { + @Nullable + private final String connectorId; + + @Nullable + private final Integer from; + + private final List jobType; + + @Nullable + private final Integer size; + + @Nullable + private final SyncStatus status; + + // --------------------------------------------------------------------------------------------- + + private SyncJobListRequest(Builder builder) { + + this.connectorId = builder.connectorId; + this.from = builder.from; + this.jobType = ApiTypeHelper.unmodifiable(builder.jobType); + this.size = builder.size; + this.status = builder.status; + + } + + public static SyncJobListRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A connector id to fetch connector sync jobs for + *

+ * API name: {@code connector_id} + */ + @Nullable + public final String connectorId() { + return this.connectorId; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + @Nullable + public final Integer from() { + return this.from; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + */ + public final List jobType() { + return this.jobType; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + @Nullable + public final Integer size() { + return this.size; + } + + /** + * A sync job status to fetch connector sync jobs for + *

+ * API name: {@code status} + */ + @Nullable + public final SyncStatus status() { + return this.status; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobListRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String connectorId; + + @Nullable + private Integer from; + + @Nullable + private List jobType; + + @Nullable + private Integer size; + + @Nullable + private SyncStatus status; + + /** + * A connector id to fetch connector sync jobs for + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(@Nullable String value) { + this.connectorId = value; + return this; + } + + /** + * Starting offset (default: 0) + *

+ * API name: {@code from} + */ + public final Builder from(@Nullable Integer value) { + this.from = value; + return this; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + *

+ * Adds all elements of list to jobType. + */ + public final Builder jobType(List list) { + this.jobType = _listAddAll(this.jobType, list); + return this; + } + + /** + * A comma-separated list of job types to fetch the sync jobs for + *

+ * API name: {@code job_type} + *

+ * Adds one or more values to jobType. + */ + public final Builder jobType(SyncJobType value, SyncJobType... values) { + this.jobType = _listAdd(this.jobType, value, values); + return this; + } + + /** + * Specifies a max number of results to get + *

+ * API name: {@code size} + */ + public final Builder size(@Nullable Integer value) { + this.size = value; + return this; + } + + /** + * A sync job status to fetch connector sync jobs for + *

+ * API name: {@code status} + */ + public final Builder status(@Nullable SyncStatus value) { + this.status = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobListRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobListRequest build() { + _checkSingleUse(); + + return new SyncJobListRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_list}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_list", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_connector/_sync_job"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (ApiTypeHelper.isDefined(request.jobType)) { + params.put("job_type", + request.jobType.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); + } + if (request.size != null) { + params.put("size", String.valueOf(request.size)); + } + if (request.connectorId != null) { + params.put("connector_id", request.connectorId); + } + if (request.from != null) { + params.put("from", String.valueOf(request.from)); + } + if (request.status != null) { + params.put("status", request.status.jsonValue()); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, SyncJobListResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java new file mode 100644 index 000000000..210545d41 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListResponse.java @@ -0,0 +1,210 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_list.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobListResponse implements JsonpSerializable { + private final long count; + + private final List results; + + // --------------------------------------------------------------------------------------------- + + private SyncJobListResponse(Builder builder) { + + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count"); + this.results = ApiTypeHelper.unmodifiableRequired(builder.results, this, "results"); + + } + + public static SyncJobListResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } + + /** + * Required - API name: {@code results} + */ + public final List results() { + return this.results; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("count"); + generator.write(this.count); + + if (ApiTypeHelper.isDefined(this.results)) { + generator.writeKey("results"); + generator.writeStartArray(); + for (ConnectorSyncJob item0 : this.results) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobListResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Long count; + + private List results; + + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds all elements of list to results. + */ + public final Builder results(List list) { + this.results = _listAddAll(this.results, list); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds one or more values to results. + */ + public final Builder results(ConnectorSyncJob value, ConnectorSyncJob... values) { + this.results = _listAdd(this.results, value, values); + return this; + } + + /** + * Required - API name: {@code results} + *

+ * Adds a value to results using a builder lambda. + */ + public final Builder results(Function> fn) { + return results(fn.apply(new ConnectorSyncJob.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobListResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobListResponse build() { + _checkSingleUse(); + + return new SyncJobListResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobListResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobListResponse::setupSyncJobListResponseDeserializer); + + protected static void setupSyncJobListResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::results, JsonpDeserializer.arrayDeserializer(ConnectorSyncJob._DESERIALIZER), "results"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java new file mode 100644 index 000000000..88290cfea --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java @@ -0,0 +1,245 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_post.Request + +/** + * Creates a connector sync job. + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobPostRequest extends RequestBase implements JsonpSerializable { + private final String id; + + @Nullable + private final SyncJobType jobType; + + @Nullable + private final SyncJobTriggerMethod triggerMethod; + + // --------------------------------------------------------------------------------------------- + + private SyncJobPostRequest(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.jobType = builder.jobType; + this.triggerMethod = builder.triggerMethod; + + } + + public static SyncJobPostRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The id of the associated connector + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * API name: {@code job_type} + */ + @Nullable + public final SyncJobType jobType() { + return this.jobType; + } + + /** + * API name: {@code trigger_method} + */ + @Nullable + public final SyncJobTriggerMethod triggerMethod() { + return this.triggerMethod; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("id"); + generator.write(this.id); + + if (this.jobType != null) { + generator.writeKey("job_type"); + this.jobType.serialize(generator, mapper); + } + if (this.triggerMethod != null) { + generator.writeKey("trigger_method"); + this.triggerMethod.serialize(generator, mapper); + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobPostRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String id; + + @Nullable + private SyncJobType jobType; + + @Nullable + private SyncJobTriggerMethod triggerMethod; + + /** + * Required - The id of the associated connector + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * API name: {@code job_type} + */ + public final Builder jobType(@Nullable SyncJobType value) { + this.jobType = value; + return this; + } + + /** + * API name: {@code trigger_method} + */ + public final Builder triggerMethod(@Nullable SyncJobTriggerMethod value) { + this.triggerMethod = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobPostRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobPostRequest build() { + _checkSingleUse(); + + return new SyncJobPostRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobPostRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobPostRequest::setupSyncJobPostRequestDeserializer); + + protected static void setupSyncJobPostRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::jobType, SyncJobType._DESERIALIZER, "job_type"); + op.add(Builder::triggerMethod, SyncJobTriggerMethod._DESERIALIZER, "trigger_method"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.sync_job_post}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.sync_job_post", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_connector/_sync_job"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, SyncJobPostResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java new file mode 100644 index 000000000..cb55d6e6b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.sync_job_post.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncJobPostResponse implements JsonpSerializable { + private final String id; + + // --------------------------------------------------------------------------------------------- + + private SyncJobPostResponse(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + + } + + public static SyncJobPostResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("id"); + generator.write(this.id); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncJobPostResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String id; + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncJobPostResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncJobPostResponse build() { + _checkSingleUse(); + + return new SyncJobPostResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncJobPostResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SyncJobPostResponse::setupSyncJobPostResponseDeserializer); + + protected static void setupSyncJobPostResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java new file mode 100644 index 000000000..d9ece5d16 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobTriggerMethod.java @@ -0,0 +1,67 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncJobTriggerMethod implements JsonEnum { + OnDemand("on_demand"), + + Scheduled("scheduled"), + + ; + + private final String jsonValue; + + SyncJobTriggerMethod(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncJobTriggerMethod.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java new file mode 100644 index 000000000..f83282d4b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobType.java @@ -0,0 +1,68 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncJobType implements JsonEnum { + Full("full"), + + Incremental("incremental"), + + AccessControl("access_control"), + + ; + + private final String jsonValue; + + SyncJobType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncJobType.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java new file mode 100644 index 000000000..68fa4f46a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncRulesFeature.java @@ -0,0 +1,201 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +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.JsonpUtils; +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; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.SyncRulesFeature + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SyncRulesFeature implements JsonpSerializable { + @Nullable + private final FeatureEnabled advanced; + + @Nullable + private final FeatureEnabled basic; + + // --------------------------------------------------------------------------------------------- + + private SyncRulesFeature(Builder builder) { + + this.advanced = builder.advanced; + this.basic = builder.basic; + + } + + public static SyncRulesFeature of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code advanced} + */ + @Nullable + public final FeatureEnabled advanced() { + return this.advanced; + } + + /** + * API name: {@code basic} + */ + @Nullable + public final FeatureEnabled basic() { + return this.basic; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.advanced != null) { + generator.writeKey("advanced"); + this.advanced.serialize(generator, mapper); + + } + if (this.basic != null) { + generator.writeKey("basic"); + this.basic.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SyncRulesFeature}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private FeatureEnabled advanced; + + @Nullable + private FeatureEnabled basic; + + /** + * API name: {@code advanced} + */ + public final Builder advanced(@Nullable FeatureEnabled value) { + this.advanced = value; + return this; + } + + /** + * API name: {@code advanced} + */ + public final Builder advanced(Function> fn) { + return this.advanced(fn.apply(new FeatureEnabled.Builder()).build()); + } + + /** + * API name: {@code basic} + */ + public final Builder basic(@Nullable FeatureEnabled value) { + this.basic = value; + return this; + } + + /** + * API name: {@code basic} + */ + public final Builder basic(Function> fn) { + return this.basic(fn.apply(new FeatureEnabled.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SyncRulesFeature}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SyncRulesFeature build() { + _checkSingleUse(); + + return new SyncRulesFeature(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SyncRulesFeature} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SyncRulesFeature::setupSyncRulesFeatureDeserializer); + + protected static void setupSyncRulesFeatureDeserializer(ObjectDeserializer op) { + + op.add(Builder::advanced, FeatureEnabled._DESERIALIZER, "advanced"); + op.add(Builder::basic, FeatureEnabled._DESERIALIZER, "basic"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java new file mode 100644 index 000000000..80514495b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/SyncStatus.java @@ -0,0 +1,76 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum SyncStatus implements JsonEnum { + Canceling("canceling"), + + Canceled("canceled"), + + Completed("completed"), + + Error("error"), + + InProgress("in_progress"), + + Pending("pending"), + + Suspended("suspended"), + + ; + + private final String jsonValue; + + SyncStatus(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + SyncStatus.values()); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java new file mode 100644 index 000000000..518494566 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java @@ -0,0 +1,184 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_active_filtering.Request + +/** + * Activates the valid draft filtering for a connector. + * + * @see API + * specification + */ + +public class UpdateActiveFilteringRequest extends RequestBase { + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private UpdateActiveFilteringRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static UpdateActiveFilteringRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateActiveFilteringRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateActiveFilteringRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateActiveFilteringRequest build() { + _checkSingleUse(); + + return new UpdateActiveFilteringRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_active_filtering}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_active_filtering", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + buf.append("/_activate"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), false, UpdateActiveFilteringResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java new file mode 100644 index 000000000..42011066e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_active_filtering.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateActiveFilteringResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateActiveFilteringResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateActiveFilteringResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateActiveFilteringResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateActiveFilteringResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateActiveFilteringResponse build() { + _checkSingleUse(); + + return new UpdateActiveFilteringResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateActiveFilteringResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateActiveFilteringResponse::setupUpdateActiveFilteringResponseDeserializer); + + protected static void setupUpdateActiveFilteringResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java new file mode 100644 index 000000000..ec1beb3a5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdRequest.java @@ -0,0 +1,270 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_api_key_id.Request + +/** + * Updates the API key id in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateApiKeyIdRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final String apiKeyId; + + @Nullable + private final String apiKeySecretId; + + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private UpdateApiKeyIdRequest(Builder builder) { + + this.apiKeyId = builder.apiKeyId; + this.apiKeySecretId = builder.apiKeySecretId; + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + + } + + public static UpdateApiKeyIdRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code api_key_id} + */ + @Nullable + public final String apiKeyId() { + return this.apiKeyId; + } + + /** + * API name: {@code api_key_secret_id} + */ + @Nullable + public final String apiKeySecretId() { + return this.apiKeySecretId; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.apiKeyId != null) { + generator.writeKey("api_key_id"); + generator.write(this.apiKeyId); + + } + if (this.apiKeySecretId != null) { + generator.writeKey("api_key_secret_id"); + generator.write(this.apiKeySecretId); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateApiKeyIdRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String apiKeyId; + + @Nullable + private String apiKeySecretId; + + private String connectorId; + + /** + * API name: {@code api_key_id} + */ + public final Builder apiKeyId(@Nullable String value) { + this.apiKeyId = value; + return this; + } + + /** + * API name: {@code api_key_secret_id} + */ + public final Builder apiKeySecretId(@Nullable String value) { + this.apiKeySecretId = value; + return this; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateApiKeyIdRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateApiKeyIdRequest build() { + _checkSingleUse(); + + return new UpdateApiKeyIdRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateApiKeyIdRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateApiKeyIdRequest::setupUpdateApiKeyIdRequestDeserializer); + + protected static void setupUpdateApiKeyIdRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::apiKeyId, JsonpDeserializer.stringDeserializer(), "api_key_id"); + op.add(Builder::apiKeySecretId, JsonpDeserializer.stringDeserializer(), "api_key_secret_id"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_api_key_id}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_api_key_id", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_api_key_id"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateApiKeyIdResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java new file mode 100644 index 000000000..1bd4736e6 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateApiKeyIdResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_api_key_id.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateApiKeyIdResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateApiKeyIdResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateApiKeyIdResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateApiKeyIdResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateApiKeyIdResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateApiKeyIdResponse build() { + _checkSingleUse(); + + return new UpdateApiKeyIdResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateApiKeyIdResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateApiKeyIdResponse::setupUpdateApiKeyIdResponseDeserializer); + + protected static void setupUpdateApiKeyIdResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java new file mode 100644 index 000000000..0c5965cae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java @@ -0,0 +1,315 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_configuration.Request + +/** + * Updates the configuration field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateConfigurationRequest extends RequestBase implements JsonpSerializable { + private final Map configuration; + + private final String connectorId; + + private final Map values; + + // --------------------------------------------------------------------------------------------- + + private UpdateConfigurationRequest(Builder builder) { + + this.configuration = ApiTypeHelper.unmodifiable(builder.configuration); + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.values = ApiTypeHelper.unmodifiable(builder.values); + + } + + public static UpdateConfigurationRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code configuration} + */ + public final Map configuration() { + return this.configuration; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code values} + */ + public final Map values() { + return this.values; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.configuration)) { + generator.writeKey("configuration"); + generator.writeStartObject(); + for (Map.Entry item0 : this.configuration.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.values)) { + generator.writeKey("values"); + generator.writeStartObject(); + for (Map.Entry item0 : this.values.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateConfigurationRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Map configuration; + + private String connectorId; + + @Nullable + private Map values; + + /** + * API name: {@code configuration} + *

+ * Adds all entries of map to configuration. + */ + public final Builder configuration(Map map) { + this.configuration = _mapPutAll(this.configuration, map); + return this; + } + + /** + * API name: {@code configuration} + *

+ * Adds an entry to configuration. + */ + public final Builder configuration(String key, ConnectorConfigProperties value) { + this.configuration = _mapPut(this.configuration, key, value); + return this; + } + + /** + * API name: {@code configuration} + *

+ * Adds an entry to configuration using a builder lambda. + */ + public final Builder configuration(String key, + Function> fn) { + return configuration(key, fn.apply(new ConnectorConfigProperties.Builder()).build()); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code values} + *

+ * Adds all entries of map to values. + */ + public final Builder values(Map map) { + this.values = _mapPutAll(this.values, map); + return this; + } + + /** + * API name: {@code values} + *

+ * Adds an entry to values. + */ + public final Builder values(String key, JsonData value) { + this.values = _mapPut(this.values, key, value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateConfigurationRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateConfigurationRequest build() { + _checkSingleUse(); + + return new UpdateConfigurationRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateConfigurationRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateConfigurationRequest::setupUpdateConfigurationRequestDeserializer); + + protected static void setupUpdateConfigurationRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::configuration, JsonpDeserializer.stringMapDeserializer(ConnectorConfigProperties._DESERIALIZER), + "configuration"); + op.add(Builder::values, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "values"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_configuration}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_configuration", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_configuration"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateConfigurationResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java new file mode 100644 index 000000000..d690482c8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_configuration.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateConfigurationResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateConfigurationResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateConfigurationResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateConfigurationResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateConfigurationResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateConfigurationResponse build() { + _checkSingleUse(); + + return new UpdateConfigurationResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateConfigurationResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateConfigurationResponse::setupUpdateConfigurationResponseDeserializer); + + protected static void setupUpdateConfigurationResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java new file mode 100644 index 000000000..f4d02d753 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java @@ -0,0 +1,259 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.JsonValue; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_error.Request + +/** + * Updates the filtering field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateErrorRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String error; + + private final boolean isExpNullError; + + // --------------------------------------------------------------------------------------------- + + private UpdateErrorRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.error = builder.error; + this.isExpNullError = builder.isExpNullError; + + } + + public static UpdateErrorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code error} + */ + public final String error() { + return this.error; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (!isExpNullError) { + generator.writeKey("error"); + generator.write(this.error); + + } + + else if (isExpNullError) { + generator.writeKey("error"); + generator.write(JsonValue.NULL); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateErrorRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String error; + + private boolean isExpNullError; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code error} + */ + public final Builder error(String value) { + this.error = value; + this.isExpNullError = false; + return this; + } + + /** + * Required - API name: {@code error} + */ + public final Builder errorWithNull() { + this.isExpNullError = true; + this.error = null; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateErrorRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateErrorRequest build() { + _checkSingleUse(); + + return new UpdateErrorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateErrorRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateErrorRequest::setupUpdateErrorRequestDeserializer); + + protected static void setupUpdateErrorRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::error, JsonpDeserializer.stringDeserializer(), "error"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_error}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_error", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_error"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateErrorResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java new file mode 100644 index 000000000..f5247a227 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorResponse.java @@ -0,0 +1,155 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_error.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateErrorResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateErrorResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateErrorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateErrorResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateErrorResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateErrorResponse build() { + _checkSingleUse(); + + return new UpdateErrorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateErrorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateErrorResponse::setupUpdateErrorResponseDeserializer); + + protected static void setupUpdateErrorResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java new file mode 100644 index 000000000..a3d636dae --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java @@ -0,0 +1,357 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering.Request + +/** + * Updates the filtering field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final FilteringAdvancedSnippet advancedSnippet; + + private final String connectorId; + + private final List filtering; + + private final List rules; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringRequest(Builder builder) { + + this.advancedSnippet = builder.advancedSnippet; + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.filtering = ApiTypeHelper.unmodifiable(builder.filtering); + this.rules = ApiTypeHelper.unmodifiable(builder.rules); + + } + + public static UpdateFilteringRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code advanced_snippet} + */ + @Nullable + public final FilteringAdvancedSnippet advancedSnippet() { + return this.advancedSnippet; + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code filtering} + */ + public final List filtering() { + return this.filtering; + } + + /** + * API name: {@code rules} + */ + public final List rules() { + return this.rules; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.advancedSnippet != null) { + generator.writeKey("advanced_snippet"); + this.advancedSnippet.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.filtering)) { + generator.writeKey("filtering"); + generator.writeStartArray(); + for (FilteringConfig item0 : this.filtering) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.rules)) { + generator.writeKey("rules"); + generator.writeStartArray(); + for (FilteringRule item0 : this.rules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private FilteringAdvancedSnippet advancedSnippet; + + private String connectorId; + + @Nullable + private List filtering; + + @Nullable + private List rules; + + /** + * API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet(@Nullable FilteringAdvancedSnippet value) { + this.advancedSnippet = value; + return this; + } + + /** + * API name: {@code advanced_snippet} + */ + public final Builder advancedSnippet( + Function> fn) { + return this.advancedSnippet(fn.apply(new FilteringAdvancedSnippet.Builder()).build()); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds all elements of list to filtering. + */ + public final Builder filtering(List list) { + this.filtering = _listAddAll(this.filtering, list); + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds one or more values to filtering. + */ + public final Builder filtering(FilteringConfig value, FilteringConfig... values) { + this.filtering = _listAdd(this.filtering, value, values); + return this; + } + + /** + * API name: {@code filtering} + *

+ * Adds a value to filtering using a builder lambda. + */ + public final Builder filtering(Function> fn) { + return filtering(fn.apply(new FilteringConfig.Builder()).build()); + } + + /** + * API name: {@code rules} + *

+ * Adds all elements of list to rules. + */ + public final Builder rules(List list) { + this.rules = _listAddAll(this.rules, list); + return this; + } + + /** + * API name: {@code rules} + *

+ * Adds one or more values to rules. + */ + public final Builder rules(FilteringRule value, FilteringRule... values) { + this.rules = _listAdd(this.rules, value, values); + return this; + } + + /** + * API name: {@code rules} + *

+ * Adds a value to rules using a builder lambda. + */ + public final Builder rules(Function> fn) { + return rules(fn.apply(new FilteringRule.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringRequest build() { + _checkSingleUse(); + + return new UpdateFilteringRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringRequest::setupUpdateFilteringRequestDeserializer); + + protected static void setupUpdateFilteringRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::advancedSnippet, FilteringAdvancedSnippet._DESERIALIZER, "advanced_snippet"); + op.add(Builder::filtering, JsonpDeserializer.arrayDeserializer(FilteringConfig._DESERIALIZER), "filtering"); + op.add(Builder::rules, JsonpDeserializer.arrayDeserializer(FilteringRule._DESERIALIZER), "rules"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_filtering}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_filtering", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateFilteringResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java new file mode 100644 index 000000000..f95fbf72c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateFilteringResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringResponse build() { + _checkSingleUse(); + + return new UpdateFilteringResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringResponse::setupUpdateFilteringResponseDeserializer); + + protected static void setupUpdateFilteringResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java new file mode 100644 index 000000000..4c204e883 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java @@ -0,0 +1,246 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering_validation.Request + +/** + * Updates the draft filtering validation info for a connector. + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringValidationRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final FilteringRulesValidation validation; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringValidationRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.validation = ApiTypeHelper.requireNonNull(builder.validation, this, "validation"); + + } + + public static UpdateFilteringValidationRequest of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code validation} + */ + public final FilteringRulesValidation validation() { + return this.validation; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("validation"); + this.validation.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringValidationRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private FilteringRulesValidation validation; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation(FilteringRulesValidation value) { + this.validation = value; + return this; + } + + /** + * Required - API name: {@code validation} + */ + public final Builder validation( + Function> fn) { + return this.validation(fn.apply(new FilteringRulesValidation.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringValidationRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringValidationRequest build() { + _checkSingleUse(); + + return new UpdateFilteringValidationRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringValidationRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringValidationRequest::setupUpdateFilteringValidationRequestDeserializer); + + protected static void setupUpdateFilteringValidationRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::validation, FilteringRulesValidation._DESERIALIZER, "validation"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_filtering_validation}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_filtering_validation", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_filtering"); + buf.append("/_validation"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateFilteringValidationResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java new file mode 100644 index 000000000..f152d7774 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationResponse.java @@ -0,0 +1,158 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_filtering_validation.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateFilteringValidationResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateFilteringValidationResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateFilteringValidationResponse of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateFilteringValidationResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateFilteringValidationResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateFilteringValidationResponse build() { + _checkSingleUse(); + + return new UpdateFilteringValidationResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateFilteringValidationResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateFilteringValidationResponse::setupUpdateFilteringValidationResponseDeserializer); + + protected static void setupUpdateFilteringValidationResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java new file mode 100644 index 000000000..42cd58058 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java @@ -0,0 +1,261 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.JsonValue; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_index_name.Request + +/** + * Updates the index_name in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateIndexNameRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String indexName; + + private final boolean isExpNullIndexName; + + // --------------------------------------------------------------------------------------------- + + private UpdateIndexNameRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.indexName = builder.indexName; + this.isExpNullIndexName = builder.isExpNullIndexName; + + } + + public static UpdateIndexNameRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code index_name} + */ + public final String indexName() { + return this.indexName; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (!isExpNullIndexName) { + generator.writeKey("index_name"); + generator.write(this.indexName); + + } + + else if (isExpNullIndexName) { + generator.writeKey("index_name"); + generator.write(JsonValue.NULL); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateIndexNameRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String indexName; + + private boolean isExpNullIndexName; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexName(String value) { + this.indexName = value; + this.isExpNullIndexName = false; + return this; + } + + /** + * Required - API name: {@code index_name} + */ + public final Builder indexNameWithNull() { + this.isExpNullIndexName = true; + this.indexName = null; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateIndexNameRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateIndexNameRequest build() { + _checkSingleUse(); + + return new UpdateIndexNameRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateIndexNameRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateIndexNameRequest::setupUpdateIndexNameRequestDeserializer); + + protected static void setupUpdateIndexNameRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::indexName, JsonpDeserializer.stringDeserializer(), "index_name"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_index_name}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_index_name", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_index_name"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateIndexNameResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java new file mode 100644 index 000000000..d762a6935 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_index_name.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateIndexNameResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateIndexNameResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateIndexNameResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateIndexNameResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateIndexNameResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateIndexNameResponse build() { + _checkSingleUse(); + + return new UpdateIndexNameResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateIndexNameResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateIndexNameResponse::setupUpdateIndexNameResponseDeserializer); + + protected static void setupUpdateIndexNameResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java new file mode 100644 index 000000000..12c5bf4dd --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java @@ -0,0 +1,269 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_name.Request + +/** + * Updates the name and description fields in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNameRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + @Nullable + private final String description; + + @Nullable + private final String name; + + // --------------------------------------------------------------------------------------------- + + private UpdateNameRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.description = builder.description; + this.name = builder.name; + + } + + public static UpdateNameRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNameRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + @Nullable + private String description; + + @Nullable + private String name; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNameRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNameRequest build() { + _checkSingleUse(); + + return new UpdateNameRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNameRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNameRequest::setupUpdateNameRequestDeserializer); + + protected static void setupUpdateNameRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_name}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_name", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_name"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateNameResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java new file mode 100644 index 000000000..eccdaaa88 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameResponse.java @@ -0,0 +1,155 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_name.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNameResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateNameResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateNameResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNameResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNameResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNameResponse build() { + _checkSingleUse(); + + return new UpdateNameResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNameResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNameResponse::setupUpdateNameResponseDeserializer); + + protected static void setupUpdateNameResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java new file mode 100644 index 000000000..728a5783b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java @@ -0,0 +1,235 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_native.Request + +/** + * Updates the is_native flag in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNativeRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final boolean isNative; + + // --------------------------------------------------------------------------------------------- + + private UpdateNativeRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.isNative = ApiTypeHelper.requireNonNull(builder.isNative, this, "isNative"); + + } + + public static UpdateNativeRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code is_native} + */ + public final boolean isNative() { + return this.isNative; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("is_native"); + generator.write(this.isNative); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNativeRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private Boolean isNative; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code is_native} + */ + public final Builder isNative(boolean value) { + this.isNative = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNativeRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNativeRequest build() { + _checkSingleUse(); + + return new UpdateNativeRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNativeRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNativeRequest::setupUpdateNativeRequestDeserializer); + + protected static void setupUpdateNativeRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::isNative, JsonpDeserializer.booleanDeserializer(), "is_native"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_native}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_native", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_native"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateNativeResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java new file mode 100644 index 000000000..47a357eeb --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_native.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateNativeResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateNativeResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateNativeResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateNativeResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateNativeResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateNativeResponse build() { + _checkSingleUse(); + + return new UpdateNativeResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateNativeResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateNativeResponse::setupUpdateNativeResponseDeserializer); + + protected static void setupUpdateNativeResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java new file mode 100644 index 000000000..8c77a6354 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java @@ -0,0 +1,242 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_pipeline.Request + +/** + * Updates the pipeline field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdatePipelineRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final IngestPipelineParams pipeline; + + // --------------------------------------------------------------------------------------------- + + private UpdatePipelineRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.pipeline = ApiTypeHelper.requireNonNull(builder.pipeline, this, "pipeline"); + + } + + public static UpdatePipelineRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code pipeline} + */ + public final IngestPipelineParams pipeline() { + return this.pipeline; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("pipeline"); + this.pipeline.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdatePipelineRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private IngestPipelineParams pipeline; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code pipeline} + */ + public final Builder pipeline(IngestPipelineParams value) { + this.pipeline = value; + return this; + } + + /** + * Required - API name: {@code pipeline} + */ + public final Builder pipeline(Function> fn) { + return this.pipeline(fn.apply(new IngestPipelineParams.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdatePipelineRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdatePipelineRequest build() { + _checkSingleUse(); + + return new UpdatePipelineRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdatePipelineRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdatePipelineRequest::setupUpdatePipelineRequestDeserializer); + + protected static void setupUpdatePipelineRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::pipeline, IngestPipelineParams._DESERIALIZER, "pipeline"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_pipeline}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_pipeline", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_pipeline"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdatePipelineResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java new file mode 100644 index 000000000..d4336f8db --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_pipeline.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdatePipelineResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdatePipelineResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdatePipelineResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdatePipelineResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdatePipelineResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdatePipelineResponse build() { + _checkSingleUse(); + + return new UpdatePipelineResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdatePipelineResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdatePipelineResponse::setupUpdatePipelineResponseDeserializer); + + protected static void setupUpdatePipelineResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java new file mode 100644 index 000000000..6fc8be6e4 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java @@ -0,0 +1,244 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_scheduling.Request + +/** + * Updates the scheduling field in the connector document + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateSchedulingRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final SchedulingConfiguration scheduling; + + // --------------------------------------------------------------------------------------------- + + private UpdateSchedulingRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.scheduling = ApiTypeHelper.requireNonNull(builder.scheduling, this, "scheduling"); + + } + + public static UpdateSchedulingRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code scheduling} + */ + public final SchedulingConfiguration scheduling() { + return this.scheduling; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("scheduling"); + this.scheduling.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateSchedulingRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private SchedulingConfiguration scheduling; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code scheduling} + */ + public final Builder scheduling(SchedulingConfiguration value) { + this.scheduling = value; + return this; + } + + /** + * Required - API name: {@code scheduling} + */ + public final Builder scheduling( + Function> fn) { + return this.scheduling(fn.apply(new SchedulingConfiguration.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateSchedulingRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateSchedulingRequest build() { + _checkSingleUse(); + + return new UpdateSchedulingRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateSchedulingRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateSchedulingRequest::setupUpdateSchedulingRequestDeserializer); + + protected static void setupUpdateSchedulingRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::scheduling, SchedulingConfiguration._DESERIALIZER, "scheduling"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_scheduling}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_scheduling", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_scheduling"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateSchedulingResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java new file mode 100644 index 000000000..d3b3bcf7a --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_scheduling.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateSchedulingResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateSchedulingResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateSchedulingResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateSchedulingResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateSchedulingResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateSchedulingResponse build() { + _checkSingleUse(); + + return new UpdateSchedulingResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateSchedulingResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateSchedulingResponse::setupUpdateSchedulingResponseDeserializer); + + protected static void setupUpdateSchedulingResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java new file mode 100644 index 000000000..9e7c93ee8 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java @@ -0,0 +1,236 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_service_type.Request + +/** + * Updates the service type of the connector + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateServiceTypeRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final String serviceType; + + // --------------------------------------------------------------------------------------------- + + private UpdateServiceTypeRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.serviceType = ApiTypeHelper.requireNonNull(builder.serviceType, this, "serviceType"); + + } + + public static UpdateServiceTypeRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code service_type} + */ + public final String serviceType() { + return this.serviceType; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("service_type"); + generator.write(this.serviceType); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateServiceTypeRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private String serviceType; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code service_type} + */ + public final Builder serviceType(String value) { + this.serviceType = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateServiceTypeRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateServiceTypeRequest build() { + _checkSingleUse(); + + return new UpdateServiceTypeRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateServiceTypeRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateServiceTypeRequest::setupUpdateServiceTypeRequestDeserializer); + + protected static void setupUpdateServiceTypeRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::serviceType, JsonpDeserializer.stringDeserializer(), "service_type"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_service_type}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_service_type", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_service_type"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateServiceTypeResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java new file mode 100644 index 000000000..7f8e0d53e --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeResponse.java @@ -0,0 +1,157 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_service_type.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateServiceTypeResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateServiceTypeResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateServiceTypeResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateServiceTypeResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateServiceTypeResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateServiceTypeResponse build() { + _checkSingleUse(); + + return new UpdateServiceTypeResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateServiceTypeResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateServiceTypeResponse::setupUpdateServiceTypeResponseDeserializer); + + protected static void setupUpdateServiceTypeResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java new file mode 100644 index 000000000..5f0b7270f --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java @@ -0,0 +1,234 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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.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 jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_status.Request + +/** + * Updates the status of the connector + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateStatusRequest extends RequestBase implements JsonpSerializable { + private final String connectorId; + + private final ConnectorStatus status; + + // --------------------------------------------------------------------------------------------- + + private UpdateStatusRequest(Builder builder) { + + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); + + } + + public static UpdateStatusRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + /** + * Required - API name: {@code status} + */ + public final ConnectorStatus status() { + return this.status; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateStatusRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String connectorId; + + private ConnectorStatus status; + + /** + * Required - The unique identifier of the connector to be updated + *

+ * API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Required - API name: {@code status} + */ + public final Builder status(ConnectorStatus value) { + this.status = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateStatusRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateStatusRequest build() { + _checkSingleUse(); + + return new UpdateStatusRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateStatusRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateStatusRequest::setupUpdateStatusRequestDeserializer); + + protected static void setupUpdateStatusRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::status, ConnectorStatus._DESERIALIZER, "status"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code connector.update_status}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/connector.update_status", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_connector"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + buf.append("/_status"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _connectorId = 1 << 0; + + int propsSet = 0; + + propsSet |= _connectorId; + + if (propsSet == (_connectorId)) { + params.put("connectorId", request.connectorId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateStatusResponse._DESERIALIZER); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java new file mode 100644 index 000000000..f5cfe4ad5 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusResponse.java @@ -0,0 +1,156 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.elasticsearch._types.Result; +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector.update_status.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateStatusResponse implements JsonpSerializable { + private final Result result; + + // --------------------------------------------------------------------------------------------- + + private UpdateStatusResponse(Builder builder) { + + this.result = ApiTypeHelper.requireNonNull(builder.result, this, "result"); + + } + + public static UpdateStatusResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code result} + */ + public final Result result() { + return this.result; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("result"); + this.result.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateStatusResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Result result; + + /** + * Required - API name: {@code result} + */ + public final Builder result(Result value) { + this.result = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateStatusResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateStatusResponse build() { + _checkSingleUse(); + + return new UpdateStatusResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateStatusResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateStatusResponse::setupUpdateStatusResponseDeserializer); + + protected static void setupUpdateStatusResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::result, Result._DESERIALIZER, "result"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java new file mode 100644 index 000000000..c84ac100b --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/Validation.java @@ -0,0 +1,308 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonEnum; +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.JsonpUtils; +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.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; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: connector._types.Validation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Validation implements TaggedUnion, JsonpSerializable { + + /** + * {@link Validation} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + GreaterThan("greater_than"), + + IncludedIn("included_in"), + + LessThan("less_than"), + + ListType("list_type"), + + Regex("regex"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final ValidationVariant _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final ValidationVariant _get() { + return _value; + } + + public Validation(ValidationVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._validationKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private Validation(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static Validation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code greater_than}? + */ + public boolean isGreaterThan() { + return _kind == Kind.GreaterThan; + } + + /** + * Get the {@code greater_than} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code greater_than} kind. + */ + public GreaterThanValidation greaterThan() { + return TaggedUnionUtils.get(this, Kind.GreaterThan); + } + + /** + * Is this variant instance of kind {@code included_in}? + */ + public boolean isIncludedIn() { + return _kind == Kind.IncludedIn; + } + + /** + * Get the {@code included_in} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code included_in} kind. + */ + public IncludedInValidation includedIn() { + return TaggedUnionUtils.get(this, Kind.IncludedIn); + } + + /** + * Is this variant instance of kind {@code less_than}? + */ + public boolean isLessThan() { + return _kind == Kind.LessThan; + } + + /** + * Get the {@code less_than} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code less_than} kind. + */ + public LessThanValidation lessThan() { + return TaggedUnionUtils.get(this, Kind.LessThan); + } + + /** + * Is this variant instance of kind {@code list_type}? + */ + public boolean isListType() { + return _kind == Kind.ListType; + } + + /** + * Get the {@code list_type} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code list_type} kind. + */ + public ListTypeValidation listType() { + return TaggedUnionUtils.get(this, Kind.ListType); + } + + /** + * Is this variant instance of kind {@code regex}? + */ + public boolean isRegex() { + return _kind == Kind.Regex; + } + + /** + * Get the {@code regex} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code regex} kind. + */ + public RegexValidation regex() { + return TaggedUnionUtils.get(this, Kind.Regex); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + mapper.serialize(_value, generator); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private ValidationVariant _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder greaterThan(GreaterThanValidation v) { + this._kind = Kind.GreaterThan; + this._value = v; + return this; + } + + public ObjectBuilder greaterThan( + Function> fn) { + return this.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); + } + + public ObjectBuilder includedIn(IncludedInValidation v) { + this._kind = Kind.IncludedIn; + this._value = v; + return this; + } + + public ObjectBuilder includedIn( + Function> fn) { + return this.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); + } + + public ObjectBuilder lessThan(LessThanValidation v) { + this._kind = Kind.LessThan; + this._value = v; + return this; + } + + public ObjectBuilder lessThan( + Function> fn) { + return this.lessThan(fn.apply(new LessThanValidation.Builder()).build()); + } + + public ObjectBuilder listType(ListTypeValidation v) { + this._kind = Kind.ListType; + this._value = v; + return this; + } + + public ObjectBuilder listType( + Function> fn) { + return this.listType(fn.apply(new ListTypeValidation.Builder()).build()); + } + + public ObjectBuilder regex(RegexValidation v) { + this._kind = Kind.Regex; + this._value = v; + return this; + } + + public ObjectBuilder regex(Function> fn) { + return this.regex(fn.apply(new RegexValidation.Builder()).build()); + } + + public Validation build() { + _checkSingleUse(); + return new Validation(this); + } + + } + + protected static void setupValidationDeserializer(ObjectDeserializer op) { + + op.add(Builder::greaterThan, GreaterThanValidation._DESERIALIZER, "greater_than"); + op.add(Builder::includedIn, IncludedInValidation._DESERIALIZER, "included_in"); + op.add(Builder::lessThan, LessThanValidation._DESERIALIZER, "less_than"); + op.add(Builder::listType, ListTypeValidation._DESERIALIZER, "list_type"); + op.add(Builder::regex, RegexValidation._DESERIALIZER, "regex"); + + op.setTypeProperty("type", null); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Validation::setupValidationDeserializer, Builder::build); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java new file mode 100644 index 000000000..a6ea904d1 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationBuilders.java @@ -0,0 +1,139 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link Validation} variants. + */ +public class ValidationBuilders { + private ValidationBuilders() { + } + + /** + * Creates a builder for the {@link GreaterThanValidation greater_than} + * {@code Validation} variant. + */ + public static GreaterThanValidation.Builder greaterThan() { + return new GreaterThanValidation.Builder(); + } + + /** + * Creates a Validation of the {@link GreaterThanValidation greater_than} + * {@code Validation} variant. + */ + public static Validation greaterThan( + Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.greaterThan(fn.apply(new GreaterThanValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link IncludedInValidation included_in} + * {@code Validation} variant. + */ + public static IncludedInValidation.Builder includedIn() { + return new IncludedInValidation.Builder(); + } + + /** + * Creates a Validation of the {@link IncludedInValidation included_in} + * {@code Validation} variant. + */ + public static Validation includedIn( + Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.includedIn(fn.apply(new IncludedInValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link LessThanValidation less_than} + * {@code Validation} variant. + */ + public static LessThanValidation.Builder lessThan() { + return new LessThanValidation.Builder(); + } + + /** + * Creates a Validation of the {@link LessThanValidation less_than} + * {@code Validation} variant. + */ + public static Validation lessThan(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.lessThan(fn.apply(new LessThanValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ListTypeValidation list_type} + * {@code Validation} variant. + */ + public static ListTypeValidation.Builder listType() { + return new ListTypeValidation.Builder(); + } + + /** + * Creates a Validation of the {@link ListTypeValidation list_type} + * {@code Validation} variant. + */ + public static Validation listType(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.listType(fn.apply(new ListTypeValidation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RegexValidation regex} {@code Validation} + * variant. + */ + public static RegexValidation.Builder regex() { + return new RegexValidation.Builder(); + } + + /** + * Creates a Validation of the {@link RegexValidation regex} {@code Validation} + * variant. + */ + public static Validation regex(Function> fn) { + Validation.Builder builder = new Validation.Builder(); + builder.regex(fn.apply(new RegexValidation.Builder()).build()); + return builder.build(); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java new file mode 100644 index 000000000..73140347d --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/connector/ValidationVariant.java @@ -0,0 +1,50 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.connector; + +import co.elastic.clients.json.JsonpSerializable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Base interface for {@link Validation} variants. + */ +public interface ValidationVariant extends JsonpSerializable { + + Validation.Kind _validationKind(); + + default Validation _toValidation() { + return new Validation(this); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index 7d42b687e..7b237e3a7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -67,8 +67,9 @@ // typedef: _global.bulk.Request /** - * Performs multiple indexing or delete operations in a single API call. This - * reduces overhead and can greatly increase indexing speed. + * Bulk index or delete documents. Performs multiple indexing or delete + * operations in a single API call. This reduces overhead and can greatly + * increase indexing speed. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java index 7334e2749..ec0f3b30f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/CreateRequest.java @@ -67,9 +67,9 @@ // typedef: _global.create.Request /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index 64debabf9..5b10609a9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -71,7 +71,7 @@ // typedef: _global.delete_by_query.Request /** - * Deletes documents that match the specified query. + * Delete documents. Deletes documents that match the specified query. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java index a1890a672..8ced3a521 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteRequest.java @@ -60,7 +60,7 @@ // typedef: _global.delete.Request /** - * Removes a JSON document from the specified index. + * Delete a document. Removes a JSON document from the specified index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java index c943e5841..3f3f8afaf 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/DeleteScriptRequest.java @@ -56,7 +56,8 @@ // typedef: _global.delete_script.Request /** - * Deletes a stored script or search template. + * Delete a script or search template. Deletes a stored script or search + * template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java index b6713cd70..3451c2bce 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsRequest.java @@ -63,7 +63,7 @@ // typedef: _global.exists.Request /** - * Checks if a document in an index exists. + * Check a document. Checks if a specified document exists. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java index 15c4579b2..d3621903e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExistsSourceRequest.java @@ -63,7 +63,8 @@ // typedef: _global.exists_source.Request /** - * Checks if a document's _source is stored. + * Check for a document source. Checks if a document's _source is + * stored. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java index 4562fdd46..06f8e861c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ExplainRequest.java @@ -63,8 +63,8 @@ // typedef: _global.explain.Request /** - * Returns information about why a specific document matches (or doesn’t match) - * a query. + * Explain a document match result. Returns information about why a specific + * document matches, or doesn’t match, a query. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java index f576edff6..5c8bb7729 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetRequest.java @@ -61,7 +61,8 @@ // typedef: _global.get.Request /** - * Returns a document. + * Get a document by its ID. Retrieves the document with the specified ID from + * an index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java index f0a1062c9..e1682f23b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptRequest.java @@ -56,7 +56,8 @@ // typedef: _global.get_script.Request /** - * Retrieves a stored script or search template. + * Get a script or search template. Retrieves a stored script or search + * template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java index 7e3c5daca..2e59164b3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/GetSourceRequest.java @@ -61,7 +61,7 @@ // typedef: _global.get_source.Request /** - * Returns the source of a document. + * Get a document's source. Returns the source of a document. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java index 49c561282..34542789c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/IndexRequest.java @@ -69,9 +69,9 @@ // typedef: _global.index.Request /** - * Adds a JSON document to the specified data stream or index and makes it - * searchable. If the target is an index and the document already exists, the - * request updates the document and increments its version. + * Index a document. Adds a JSON document to the specified data stream or index + * and makes it searchable. If the target is an index and the document already + * exists, the request updates the document and increments its version. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java index 2dd187328..d21ce18fe 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java @@ -50,7 +50,7 @@ // typedef: _global.info.Request /** - * Returns basic information about the cluster. + * Get cluster info. Returns basic information about the cluster. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java index 62f51f89e..a73479dbd 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java @@ -578,9 +578,6 @@ public MsearchRequest build() { request -> { Map params = new HashMap<>(); params.put("typed_keys", "true"); - if (request.routing != null) { - params.put("routing", request.routing); - } if (request.preFilterShardSize != null) { params.put("pre_filter_shard_size", String.valueOf(request.preFilterShardSize)); } @@ -591,6 +588,15 @@ public MsearchRequest build() { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } + if (request.searchType != null) { + params.put("search_type", request.searchType.jsonValue()); + } + if (request.ccsMinimizeRoundtrips != null) { + params.put("ccs_minimize_roundtrips", String.valueOf(request.ccsMinimizeRoundtrips)); + } + if (request.routing != null) { + params.put("routing", request.routing); + } if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); } @@ -603,12 +609,6 @@ public MsearchRequest build() { if (request.maxConcurrentSearches != null) { params.put("max_concurrent_searches", String.valueOf(request.maxConcurrentSearches)); } - if (request.searchType != null) { - params.put("search_type", request.searchType.jsonValue()); - } - if (request.ccsMinimizeRoundtrips != null) { - params.put("ccs_minimize_roundtrips", String.valueOf(request.ccsMinimizeRoundtrips)); - } return params; }, SimpleEndpoint.emptyMap(), true, MsearchResponse._DESERIALIZER); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java index 89b17d098..8c7213ad5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PingRequest.java @@ -52,7 +52,7 @@ // typedef: _global.ping.Request /** - * Returns whether the cluster is running. + * Ping the cluster. Returns whether the cluster is running. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java index 2acff98fc..aaa373dce 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/PutScriptRequest.java @@ -59,7 +59,8 @@ // typedef: _global.put_script.Request /** - * Creates or updates a stored script or search template. + * Create or update a script or search template. Creates or updates a stored + * script or search template. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java index 0019dcbd1..134ec00d1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java @@ -67,9 +67,10 @@ // typedef: _global.reindex.Request /** - * Allows to copy documents from one index to another, optionally filtering the - * source documents by a query, changing the destination index settings, or - * fetching the documents from a remote cluster. + * Reindex documents. Copies documents from a source to a destination. The + * source can be any existing index, alias, or data stream. The destination must + * differ from the source. For example, you cannot reindex a data stream into + * itself. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java index 9b53ddb42..90f19710d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/ScriptsPainlessExecuteRequest.java @@ -57,7 +57,7 @@ // typedef: _global.scripts_painless_execute.Request /** - * Runs a script and returns a result. + * Run a script. Runs a script and returns a result. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java index 848880428..e72cf5742 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java @@ -71,8 +71,7 @@ // typedef: _global.search_mvt.Request /** - * Searches a vector tile for geospatial values. Returns results as a binary - * Mapbox vector tile. + * Search a vector tile. Searches a vector tile for geospatial values. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java index 2170c2b19..a5e09f675 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java @@ -67,8 +67,8 @@ // typedef: _global.termvectors.Request /** - * Returns information and statistics about terms in the fields of a particular - * document. + * Get term vector information. Returns information and statistics about terms + * in the fields of a particular document. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java index a4b50198f..46e5c936c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsResponse.java @@ -65,6 +65,7 @@ public class TermvectorsResponse implements JsonpSerializable { private final boolean found; + @Nullable private final String id; private final String index; @@ -80,7 +81,7 @@ public class TermvectorsResponse implements JsonpSerializable { private TermvectorsResponse(Builder builder) { this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); - this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.id = builder.id; this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.termVectors = ApiTypeHelper.unmodifiable(builder.termVectors); this.took = ApiTypeHelper.requireNonNull(builder.took, this, "took"); @@ -100,8 +101,9 @@ public final boolean found() { } /** - * Required - API name: {@code _id} + * API name: {@code _id} */ + @Nullable public final String id() { return this.id; } @@ -148,9 +150,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("found"); generator.write(this.found); - generator.writeKey("_id"); - generator.write(this.id); + if (this.id != null) { + generator.writeKey("_id"); + generator.write(this.id); + } generator.writeKey("_index"); generator.write(this.index); @@ -189,6 +193,7 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private Boolean found; + @Nullable private String id; private String index; @@ -209,9 +214,9 @@ public final Builder found(boolean value) { } /** - * Required - API name: {@code _id} + * API name: {@code _id} */ - public final Builder id(String value) { + public final Builder id(@Nullable String value) { this.id = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index fb314ace8..869a86813 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -72,9 +72,10 @@ // typedef: _global.update_by_query.Request /** - * Updates documents that match the specified query. If no query is specified, - * performs an update on every document in the data stream or index without - * modifying the source, which is useful for picking up mapping changes. + * Update documents. Updates documents that match the specified query. If no + * query is specified, performs an update on every document in the data stream + * or index without modifying the source, which is useful for picking up mapping + * changes. * * @see API * specification @@ -121,6 +122,9 @@ public class UpdateByQueryRequest extends RequestBase implements JsonpSerializab @Nullable private final String preference; + @Nullable + private final String q; + @Nullable private final Query query; @@ -197,6 +201,7 @@ private UpdateByQueryRequest(Builder builder) { this.maxDocs = builder.maxDocs; this.pipeline = builder.pipeline; this.preference = builder.preference; + this.q = builder.q; this.query = builder.query; this.refresh = builder.refresh; this.requestCache = builder.requestCache; @@ -383,6 +388,16 @@ public final String preference() { return this.preference; } + /** + * Query in the Lucene query string syntax. + *

+ * API name: {@code q} + */ + @Nullable + public final String q() { + return this.q; + } + /** * Specifies the documents to update using the Query DSL. *

@@ -683,6 +698,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private String preference; + @Nullable + private String q; + @Nullable private Query query; @@ -939,6 +957,16 @@ public final Builder preference(@Nullable String value) { return this; } + /** + * Query in the Lucene query string syntax. + *

+ * API name: {@code q} + */ + public final Builder q(@Nullable String value) { + this.q = value; + return this; + } + /** * Specifies the documents to update using the Query DSL. *

@@ -1422,6 +1450,9 @@ protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializerAPI * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java index b82dbca4a..222467ece 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/get/GetResult.java @@ -36,6 +36,7 @@ import java.lang.Boolean; import java.lang.Long; import java.lang.String; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.function.Function; @@ -70,6 +71,8 @@ public class GetResult implements JsonpSerializable { private final Map fields; + private final List ignored; + private final boolean found; private final String id; @@ -98,6 +101,7 @@ protected GetResult(AbstractBuilder builder) { this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.fields = ApiTypeHelper.unmodifiable(builder.fields); + this.ignored = ApiTypeHelper.unmodifiable(builder.ignored); this.found = ApiTypeHelper.requireNonNull(builder.found, this, "found"); this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.primaryTerm = builder.primaryTerm; @@ -128,6 +132,13 @@ public final Map fields() { return this.fields; } + /** + * API name: {@code _ignored} + */ + public final List ignored() { + return this.ignored; + } + /** * Required - API name: {@code found} */ @@ -206,6 +217,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.ignored)) { + generator.writeKey("_ignored"); + generator.writeStartArray(); + for (String item0 : this.ignored) { + generator.write(item0); + + } + generator.writeEnd(); + } generator.writeKey("found"); generator.write(this.found); @@ -281,6 +302,9 @@ public abstract static class AbstractBuilder fields; + @Nullable + private List ignored; + private Boolean found; private String id; @@ -331,6 +355,26 @@ public final BuilderT fields(String key, JsonData value) { return self(); } + /** + * API name: {@code _ignored} + *

+ * Adds all elements of list to ignored. + */ + public final BuilderT ignored(List list) { + this.ignored = _listAddAll(this.ignored, list); + return self(); + } + + /** + * API name: {@code _ignored} + *

+ * Adds one or more values to ignored. + */ + public final BuilderT ignored(String value, String... values) { + this.ignored = _listAdd(this.ignored, value, values); + return self(); + } + /** * Required - API name: {@code found} */ @@ -424,6 +468,8 @@ protected static implements ObjectBuilder { + @Nullable private String id; private String index; @@ -239,9 +244,9 @@ public static class Builder extends WithJsonObjectBuilderBase private ErrorCause error; /** - * Required - API name: {@code _id} + * API name: {@code _id} */ - public final Builder id(String value) { + public final Builder id(@Nullable String value) { this.id = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java index 23595d28b..133c82c31 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/rank_eval/RankEvalQuery.java @@ -187,6 +187,8 @@ protected static void setupRankEvalQueryDeserializer(ObjectDeserializer * API name: {@code query} */ + @Nullable public final Query query() { return this.query; } @@ -129,8 +131,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("index"); generator.write(this.index); - generator.writeKey("query"); - this.query.serialize(generator, mapper); + if (this.query != null) { + generator.writeKey("query"); + this.query.serialize(generator, mapper); + + } } @@ -152,6 +157,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String index; + @Nullable private Query query; /** @@ -178,17 +184,17 @@ public final Builder index(String value) { } /** - * Required - Use this parameter to specify a query for computing a score. + * Use this parameter to specify a query for computing a score. *

* API name: {@code query} */ - public final Builder query(Query value) { + public final Builder query(@Nullable Query value) { this.query = value; return this; } /** - * Required - Use this parameter to specify a query for computing a score. + * Use this parameter to specify a query for computing a score. *

* API name: {@code query} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java index e1ac5210b..474ceadf2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/core/search/CompletionContext.java @@ -362,7 +362,7 @@ protected static void setupCompletionContextDeserializer(ObjectDeserializer matchedFields; - @Nullable - private final Analyzer analyzer; - // --------------------------------------------------------------------------------------------- private HighlightField(Builder builder) { @@ -75,7 +71,6 @@ private HighlightField(Builder builder) { this.fragmentOffset = builder.fragmentOffset; this.matchedFields = ApiTypeHelper.unmodifiable(builder.matchedFields); - this.analyzer = builder.analyzer; } @@ -98,14 +93,6 @@ public final List matchedFields() { return this.matchedFields; } - /** - * API name: {@code analyzer} - */ - @Nullable - public final Analyzer analyzer() { - return this.analyzer; - } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); @@ -124,11 +111,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } - if (this.analyzer != null) { - generator.writeKey("analyzer"); - this.analyzer.serialize(generator, mapper); - - } } @@ -147,9 +129,6 @@ public static class Builder extends HighlightBase.AbstractBuilder @Nullable private List matchedFields; - @Nullable - private Analyzer analyzer; - /** * API name: {@code fragment_offset} */ @@ -178,21 +157,6 @@ public final Builder matchedFields(String value, String... values) { return this; } - /** - * API name: {@code analyzer} - */ - public final Builder analyzer(@Nullable Analyzer value) { - this.analyzer = value; - return this; - } - - /** - * API name: {@code analyzer} - */ - public final Builder analyzer(Function> fn) { - return this.analyzer(fn.apply(new Analyzer.Builder()).build()); - } - @Override protected Builder self() { return this; @@ -224,7 +188,6 @@ protected static void setupHighlightFieldDeserializer(ObjectDeserializer implements JsonpSerializable { @Nullable private final TDocument source; + @Nullable + private final Integer rank; + @Nullable private final Long seqNo; @@ -141,6 +145,7 @@ private Hit(Builder builder) { this.node = builder.node; this.routing = builder.routing; this.source = builder.source; + this.rank = builder.rank; this.seqNo = builder.seqNo; this.primaryTerm = builder.primaryTerm; this.version = builder.version; @@ -268,6 +273,14 @@ public final TDocument source() { return this.source; } + /** + * API name: {@code _rank} + */ + @Nullable + public final Integer rank() { + return this.rank; + } + /** * API name: {@code _seq_no} */ @@ -429,6 +442,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("_source"); JsonpUtils.serialize(this.source, generator, tDocumentSerializer, mapper); + } + if (this.rank != null) { + generator.writeKey("_rank"); + generator.write(this.rank); + } if (this.seqNo != null) { generator.writeKey("_seq_no"); @@ -516,6 +534,9 @@ public static class Builder extends WithJsonObjectBuilderBase source(@Nullable TDocument value) { return this; } + /** + * API name: {@code _rank} + */ + public final Builder rank(@Nullable Integer value) { + this.rank = value; + return this; + } + /** * API name: {@code _seq_no} */ @@ -933,6 +962,7 @@ protected static void setupHitDeserializer(ObjectDeserializer terms; @@ -69,7 +70,7 @@ public class TermVector implements JsonpSerializable { private TermVector(Builder builder) { - this.fieldStatistics = ApiTypeHelper.requireNonNull(builder.fieldStatistics, this, "fieldStatistics"); + this.fieldStatistics = builder.fieldStatistics; this.terms = ApiTypeHelper.unmodifiableRequired(builder.terms, this, "terms"); } @@ -79,8 +80,9 @@ public static TermVector of(Function> fn) { } /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ + @Nullable public final FieldStatistics fieldStatistics() { return this.fieldStatistics; } @@ -103,9 +105,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("field_statistics"); - this.fieldStatistics.serialize(generator, mapper); + if (this.fieldStatistics != null) { + generator.writeKey("field_statistics"); + this.fieldStatistics.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.terms)) { generator.writeKey("terms"); generator.writeStartObject(); @@ -132,20 +136,21 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private FieldStatistics fieldStatistics; private Map terms; /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ - public final Builder fieldStatistics(FieldStatistics value) { + public final Builder fieldStatistics(@Nullable FieldStatistics value) { this.fieldStatistics = value; return this; } /** - * Required - API name: {@code field_statistics} + * API name: {@code field_statistics} */ public final Builder fieldStatistics(Function> fn) { return this.fieldStatistics(fn.apply(new FieldStatistics.Builder()).build()); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 059fde231..58b1d8c07 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -10,7 +10,7 @@ '_global.bulk.OperationBase': '_global/bulk/types.ts#L90-L107', '_global.bulk.OperationContainer': '_global/bulk/types.ts#L145-L167', '_global.bulk.OperationType': '_global/bulk/types.ts#L83-L88', -'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L103', +'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L104', '_global.bulk.Response': '_global/bulk/BulkResponse.ts#L24-L31', '_global.bulk.ResponseItem': '_global/bulk/types.ts#L37-L81', '_global.bulk.UpdateAction': '_global/bulk/types.ts#L169-L205', @@ -22,33 +22,33 @@ '_global.close_point_in_time.Response': '_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36', '_global.count.Request': '_global/count/CountRequest.ts#L26-L120', '_global.count.Response': '_global/count/CountResponse.ts#L23-L25', -'_global.create.Request': '_global/create/CreateRequest.ts#L32-L95', +'_global.create.Request': '_global/create/CreateRequest.ts#L32-L96', '_global.create.Response': '_global/create/CreateResponse.ts#L22-L24', -'_global.delete.Request': '_global/delete/DeleteRequest.ts#L34-L91', +'_global.delete.Request': '_global/delete/DeleteRequest.ts#L34-L92', '_global.delete.Response': '_global/delete/DeleteResponse.ts#L22-L34', -'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L36-L209', +'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L36-L210', '_global.delete_by_query.Response': '_global/delete_by_query/DeleteByQueryResponse.ts#L26-L45', -'_global.delete_script.Request': '_global/delete_script/DeleteScriptRequest.ts#L24-L51', +'_global.delete_script.Request': '_global/delete_script/DeleteScriptRequest.ts#L24-L52', '_global.delete_script.Response': '_global/delete_script/DeleteScriptResponse.ts#L22-L24', -'_global.exists.Request': '_global/exists/DocumentExistsRequest.ts#L31-L99', -'_global.exists_source.Request': '_global/exists_source/SourceExistsRequest.ts#L31-L93', +'_global.exists.Request': '_global/exists/DocumentExistsRequest.ts#L31-L100', +'_global.exists_source.Request': '_global/exists_source/SourceExistsRequest.ts#L31-L94', '_global.explain.Explanation': '_global/explain/types.ts#L22-L26', '_global.explain.ExplanationDetail': '_global/explain/types.ts#L28-L32', -'_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L105', +'_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L106', '_global.explain.Response': '_global/explain/ExplainResponse.ts#L23-L31', '_global.field_caps.FieldCapability': '_global/field_caps/types.ts#L23-L81', '_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L25-L106', '_global.field_caps.Response': '_global/field_caps/FieldCapabilitiesResponse.ts#L24-L35', -'_global.get.GetResult': '_global/get/types.ts#L25-L35', -'_global.get.Request': '_global/get/GetRequest.ts#L31-L98', +'_global.get.GetResult': '_global/get/types.ts#L25-L36', +'_global.get.Request': '_global/get/GetRequest.ts#L31-L100', '_global.get.Response': '_global/get/GetResponse.ts#L23-L34', -'_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L41', +'_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L42', '_global.get_script.Response': '_global/get_script/GetScriptResponse.ts#L23-L29', -'_global.get_source.Request': '_global/get_source/SourceRequest.ts#L31-L86', +'_global.get_source.Request': '_global/get_source/SourceRequest.ts#L31-L88', '_global.get_source.Response': '_global/get_source/SourceResponse.ts#L20-L23', -'_global.index.Request': '_global/index/IndexRequest.ts#L35-L117', +'_global.index.Request': '_global/index/IndexRequest.ts#L35-L118', '_global.index.Response': '_global/index/IndexResponse.ts#L22-L24', -'_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L22-L27', +'_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L22-L29', '_global.info.Response': '_global/info/RootNodeInfoResponse.ts#L23-L31', '_global.mget.MultiGetError': '_global/mget/types.ts#L62-L66', '_global.mget.Operation': '_global/mget/types.ts#L32-L55', @@ -59,7 +59,7 @@ '_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L203-L206', '_global.msearch.MultisearchBody': '_global/msearch/types.ts#L70-L201', '_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L52-L67', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L96', +'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L106', '_global.msearch.Response': '_global/msearch/MultiSearchResponse.ts#L25-L27', '_global.msearch.ResponseItem': '_global/msearch/types.ts#L208-L211', '_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L70', @@ -71,39 +71,39 @@ '_global.mtermvectors.TermVectorsResult': '_global/mtermvectors/types.ts#L96-L104', '_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L24-L68', '_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L22-L24', -'_global.ping.Request': '_global/ping/PingRequest.ts#L22-L27', -'_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L64', +'_global.ping.Request': '_global/ping/PingRequest.ts#L22-L29', +'_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L65', '_global.put_script.Response': '_global/put_script/PutScriptResponse.ts#L22-L24', -'_global.rank_eval.DocumentRating': '_global/rank_eval/types.ts#L116-L123', -'_global.rank_eval.RankEvalHit': '_global/rank_eval/types.ts#L141-L145', -'_global.rank_eval.RankEvalHitItem': '_global/rank_eval/types.ts#L136-L139', +'_global.rank_eval.DocumentRating': '_global/rank_eval/types.ts#L119-L126', +'_global.rank_eval.RankEvalHit': '_global/rank_eval/types.ts#L144-L148', +'_global.rank_eval.RankEvalHitItem': '_global/rank_eval/types.ts#L139-L142', '_global.rank_eval.RankEvalMetric': '_global/rank_eval/types.ts#L90-L96', '_global.rank_eval.RankEvalMetricBase': '_global/rank_eval/types.ts#L26-L32', -'_global.rank_eval.RankEvalMetricDetail': '_global/rank_eval/types.ts#L125-L134', +'_global.rank_eval.RankEvalMetricDetail': '_global/rank_eval/types.ts#L128-L137', '_global.rank_eval.RankEvalMetricDiscountedCumulativeGain': '_global/rank_eval/types.ts#L66-L77', '_global.rank_eval.RankEvalMetricExpectedReciprocalRank': '_global/rank_eval/types.ts#L79-L88', '_global.rank_eval.RankEvalMetricMeanReciprocalRank': '_global/rank_eval/types.ts#L60-L64', '_global.rank_eval.RankEvalMetricPrecision': '_global/rank_eval/types.ts#L42-L52', '_global.rank_eval.RankEvalMetricRatingTreshold': '_global/rank_eval/types.ts#L34-L40', '_global.rank_eval.RankEvalMetricRecall': '_global/rank_eval/types.ts#L54-L58', -'_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L114', +'_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L117', '_global.rank_eval.RankEvalRequestItem': '_global/rank_eval/types.ts#L98-L109', '_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L61', '_global.rank_eval.Response': '_global/rank_eval/RankEvalResponse.ts#L26-L34', -'_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L147-L150', +'_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153', '_global.reindex.Destination': '_global/reindex/types.ts#L39-L64', '_global.reindex.RemoteSource': '_global/reindex/types.ts#L99-L125', -'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L27-L101', +'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L27-L103', '_global.reindex.Response': '_global/reindex/ReindexResponse.ts#L26-L45', '_global.reindex.Source': '_global/reindex/types.ts#L66-L97', '_global.render_search_template.Request': '_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L55', '_global.render_search_template.Response': '_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25', '_global.scripts_painless_execute.PainlessContextSetup': '_global/scripts_painless_execute/types.ts#L25-L39', -'_global.scripts_painless_execute.Request': '_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L46', +'_global.scripts_painless_execute.Request': '_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L47', '_global.scripts_painless_execute.Response': '_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24', '_global.scroll.Request': '_global/scroll/ScrollRequest.ts#L24-L59', '_global.scroll.Response': '_global/scroll/ScrollResponse.ts#L22-L24', -'_global.search.Request': '_global/search/SearchRequest.ts#L54-L520', +'_global.search.Request': '_global/search/SearchRequest.ts#L54-L530', '_global.search.Response': '_global/search/SearchResponse.ts#L34-L36', '_global.search.ResponseBody': '_global/search/SearchResponse.ts#L38-L54', '_global.search._types.AggregationBreakdown': '_global/search/_types/profile.ts#L23-L36', @@ -125,20 +125,20 @@ '_global.search._types.FieldSuggester': '_global/search/_types/suggester.ts#L109-L142', '_global.search._types.Highlight': '_global/search/_types/highlighting.ts#L153-L156', '_global.search._types.HighlightBase': '_global/search/_types/highlighting.ts#L48-L151', -'_global.search._types.HighlightField': '_global/search/_types/highlighting.ts#L193-L197', +'_global.search._types.HighlightField': '_global/search/_types/highlighting.ts#L193-L196', '_global.search._types.HighlighterEncoder': '_global/search/_types/highlighting.ts#L158-L161', '_global.search._types.HighlighterFragmenter': '_global/search/_types/highlighting.ts#L163-L166', '_global.search._types.HighlighterOrder': '_global/search/_types/highlighting.ts#L168-L170', '_global.search._types.HighlighterTagsSchema': '_global/search/_types/highlighting.ts#L172-L174', '_global.search._types.HighlighterType': '_global/search/_types/highlighting.ts#L176-L191', -'_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L64', -'_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L66-L72', -'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L106-L140', -'_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L84-L86', +'_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L65', +'_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L67-L73', +'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L107-L141', +'_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L85-L87', '_global.search._types.LaplaceSmoothingModel': '_global/search/_types/suggester.ts#L430-L435', '_global.search._types.LearningToRank': '_global/search/_types/rescoring.ts#L88-L97', '_global.search._types.LinearInterpolationSmoothingModel': '_global/search/_types/suggester.ts#L437-L441', -'_global.search._types.NestedIdentity': '_global/search/_types/hits.ts#L88-L92', +'_global.search._types.NestedIdentity': '_global/search/_types/hits.ts#L89-L93', '_global.search._types.PhraseSuggest': '_global/search/_types/suggester.ts#L57-L62', '_global.search._types.PhraseSuggestCollate': '_global/search/_types/suggester.ts#L333-L346', '_global.search._types.PhraseSuggestCollateQuery': '_global/search/_types/suggester.ts#L348-L357', @@ -170,10 +170,10 @@ '_global.search._types.TermSuggest': '_global/search/_types/suggester.ts#L64-L69', '_global.search._types.TermSuggestOption': '_global/search/_types/suggester.ts#L93-L99', '_global.search._types.TermSuggester': '_global/search/_types/suggester.ts#L506-L568', -'_global.search._types.TotalHits': '_global/search/_types/hits.ts#L94-L97', -'_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L99-L104', -'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L142-L150', -'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L188', +'_global.search._types.TotalHits': '_global/search/_types/hits.ts#L95-L98', +'_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L100-L105', +'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L143-L151', +'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L190', '_global.search_mvt.Response': '_global/search_mvt/SearchMvtResponse.ts#L22-L25', '_global.search_mvt._types.GridAggregationType': '_global/search_mvt/_types/GridType.ts#L30-L33', '_global.search_mvt._types.GridType': '_global/search_mvt/_types/GridType.ts#L20-L28', @@ -183,15 +183,15 @@ '_global.terms_enum.Response': '_global/terms_enum/TermsEnumResponse.ts#L22-L28', '_global.termvectors.FieldStatistics': '_global/termvectors/types.ts#L28-L32', '_global.termvectors.Filter': '_global/termvectors/types.ts#L49-L86', -'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L118', +'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L120', '_global.termvectors.Response': '_global/termvectors/TermVectorsResponse.ts#L25-L34', '_global.termvectors.Term': '_global/termvectors/types.ts#L34-L40', '_global.termvectors.TermVector': '_global/termvectors/types.ts#L23-L26', '_global.termvectors.Token': '_global/termvectors/types.ts#L42-L47', -'_global.update.Request': '_global/update/UpdateRequest.ts#L38-L151', +'_global.update.Request': '_global/update/UpdateRequest.ts#L38-L153', '_global.update.Response': '_global/update/UpdateResponse.ts#L27-L29', '_global.update.UpdateWriteResponseBase': '_global/update/UpdateResponse.ts#L23-L25', -'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L221', +'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L226', '_global.update_by_query.Response': '_global/update_by_query/UpdateByQueryResponse.ts#L26-L45', '_types.AcknowledgedResponseBase': '_types/Base.ts#L47-L50', '_types.BulkIndexByScrollFailure': '_types/Errors.ts#L60-L66', @@ -227,14 +227,14 @@ '_types.IndicesOptions': '_types/common.ts#L335-L362', '_types.IndicesResponseBase': '_types/Base.ts#L87-L89', '_types.InlineGet': '_types/common.ts#L320-L333', -'_types.KnnQuery': '_types/Knn.ts#L54-L67', +'_types.KnnQuery': '_types/Knn.ts#L54-L69', '_types.KnnRetriever': '_types/Retriever.ts#L58-L71', '_types.KnnSearch': '_types/Knn.ts#L30-L52', '_types.LatLonGeoLocation': '_types/Geo.ts#L120-L129', '_types.NestedSortValue': '_types/sort.ts#L30-L35', '_types.Normalization': '_types/Similarity.ts#L52-L58', '_types.OpType': '_types/common.ts#L255-L264', -'_types.QueryVectorBuilder': '_types/Knn.ts#L69-L72', +'_types.QueryVectorBuilder': '_types/Knn.ts#L71-L74', '_types.RRFRetriever': '_types/Retriever.ts#L73-L80', '_types.RankBase': '_types/Rank.ts#L30-L30', '_types.RankContainer': '_types/Rank.ts#L22-L28', @@ -264,7 +264,7 @@ '_types.StandardRetriever': '_types/Retriever.ts#L43-L56', '_types.StoredScript': '_types/Scripting.ts#L47-L57', '_types.SuggestMode': '_types/common.ts#L282-L295', -'_types.TextEmbedding': '_types/Knn.ts#L74-L77', +'_types.TextEmbedding': '_types/Knn.ts#L76-L79', '_types.TimeUnit': '_types/Time.ts#L69-L77', '_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L161-L164', '_types.TopRightBottomLeftGeoBounds': '_types/Geo.ts#L166-L169', @@ -524,28 +524,48 @@ '_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L437-L451', '_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L453-L463', '_types.aggregations.WeightedAvgAggregate': '_types/aggregations/Aggregate.ts#L212-L216', -'_types.analysis.Analyzer': '_types/analysis/analyzers.ts#L113-L131', +'_types.analysis.Analyzer': '_types/analysis/analyzers.ts#L359-L413', +'_types.analysis.ArabicAnalyzer': '_types/analysis/analyzers.ts#L61-L66', +'_types.analysis.ArmenianAnalyzer': '_types/analysis/analyzers.ts#L68-L73', '_types.analysis.AsciiFoldingTokenFilter': '_types/analysis/token_filters.ts#L170-L173', +'_types.analysis.BasqueAnalyzer': '_types/analysis/analyzers.ts#L75-L80', +'_types.analysis.BengaliAnalyzer': '_types/analysis/analyzers.ts#L82-L87', +'_types.analysis.BrazilianAnalyzer': '_types/analysis/analyzers.ts#L89-L93', +'_types.analysis.BulgarianAnalyzer': '_types/analysis/analyzers.ts#L95-L100', +'_types.analysis.CatalanAnalyzer': '_types/analysis/analyzers.ts#L102-L107', '_types.analysis.CharFilter': '_types/analysis/char_filters.ts#L28-L30', '_types.analysis.CharFilterBase': '_types/analysis/char_filters.ts#L24-L26', '_types.analysis.CharFilterDefinition': '_types/analysis/char_filters.ts#L32-L41', '_types.analysis.CharGroupTokenizer': '_types/analysis/tokenizers.ts#L56-L60', +'_types.analysis.ChineseAnalyzer': '_types/analysis/analyzers.ts#L109-L113', +'_types.analysis.CjkAnalyzer': '_types/analysis/analyzers.ts#L115-L119', '_types.analysis.CommonGramsTokenFilter': '_types/analysis/token_filters.ts#L175-L181', '_types.analysis.CompoundWordTokenFilterBase': '_types/analysis/token_filters.ts#L44-L52', '_types.analysis.ConditionTokenFilter': '_types/analysis/token_filters.ts#L183-L187', '_types.analysis.CustomAnalyzer': '_types/analysis/analyzers.ts#L28-L35', '_types.analysis.CustomNormalizer': '_types/analysis/normalizers.ts#L30-L34', +'_types.analysis.CzechAnalyzer': '_types/analysis/analyzers.ts#L121-L126', +'_types.analysis.DanishAnalyzer': '_types/analysis/analyzers.ts#L128-L132', '_types.analysis.DelimitedPayloadEncoding': '_types/analysis/token_filters.ts#L62-L66', '_types.analysis.DelimitedPayloadTokenFilter': '_types/analysis/token_filters.ts#L68-L72', '_types.analysis.DictionaryDecompounderTokenFilter': '_types/analysis/token_filters.ts#L54-L56', -'_types.analysis.DutchAnalyzer': '_types/analysis/analyzers.ts#L61-L64', +'_types.analysis.DutchAnalyzer': '_types/analysis/analyzers.ts#L134-L139', '_types.analysis.EdgeNGramSide': '_types/analysis/token_filters.ts#L74-L77', '_types.analysis.EdgeNGramTokenFilter': '_types/analysis/token_filters.ts#L79-L85', '_types.analysis.EdgeNGramTokenizer': '_types/analysis/tokenizers.ts#L31-L37', '_types.analysis.ElisionTokenFilter': '_types/analysis/token_filters.ts#L189-L194', +'_types.analysis.EnglishAnalyzer': '_types/analysis/analyzers.ts#L141-L146', +'_types.analysis.EstonianAnalyzer': '_types/analysis/analyzers.ts#L148-L152', '_types.analysis.FingerprintAnalyzer': '_types/analysis/analyzers.ts#L37-L45', '_types.analysis.FingerprintTokenFilter': '_types/analysis/token_filters.ts#L196-L200', +'_types.analysis.FinnishAnalyzer': '_types/analysis/analyzers.ts#L154-L159', +'_types.analysis.FrenchAnalyzer': '_types/analysis/analyzers.ts#L161-L166', +'_types.analysis.GalicianAnalyzer': '_types/analysis/analyzers.ts#L168-L173', +'_types.analysis.GermanAnalyzer': '_types/analysis/analyzers.ts#L175-L180', +'_types.analysis.GreekAnalyzer': '_types/analysis/analyzers.ts#L182-L186', +'_types.analysis.HindiAnalyzer': '_types/analysis/analyzers.ts#L188-L193', '_types.analysis.HtmlStripCharFilter': '_types/analysis/char_filters.ts#L43-L46', +'_types.analysis.HungarianAnalyzer': '_types/analysis/analyzers.ts#L195-L200', '_types.analysis.HunspellTokenFilter': '_types/analysis/token_filters.ts#L202-L208', '_types.analysis.HyphenationDecompounderTokenFilter': '_types/analysis/token_filters.ts#L58-L60', '_types.analysis.IcuAnalyzer': '_types/analysis/icu-plugin.ts#L67-L71', @@ -562,6 +582,9 @@ '_types.analysis.IcuTokenizer': '_types/analysis/icu-plugin.ts#L30-L33', '_types.analysis.IcuTransformDirection': '_types/analysis/icu-plugin.ts#L73-L76', '_types.analysis.IcuTransformTokenFilter': '_types/analysis/icu-plugin.ts#L24-L28', +'_types.analysis.IndonesianAnalyzer': '_types/analysis/analyzers.ts#L202-L207', +'_types.analysis.IrishAnalyzer': '_types/analysis/analyzers.ts#L209-L214', +'_types.analysis.ItalianAnalyzer': '_types/analysis/analyzers.ts#L216-L221', '_types.analysis.KStemTokenFilter': '_types/analysis/token_filters.ts#L241-L243', '_types.analysis.KeepTypesMode': '_types/analysis/token_filters.ts#L215-L218', '_types.analysis.KeepTypesTokenFilter': '_types/analysis/token_filters.ts#L220-L224', @@ -578,9 +601,11 @@ '_types.analysis.KuromojiTokenizer': '_types/analysis/kuromoji-plugin.ts#L58-L67', '_types.analysis.Language': '_types/analysis/languages.ts#L20-L55', '_types.analysis.LanguageAnalyzer': '_types/analysis/analyzers.ts#L52-L59', +'_types.analysis.LatvianAnalyzer': '_types/analysis/analyzers.ts#L223-L228', '_types.analysis.LengthTokenFilter': '_types/analysis/token_filters.ts#L245-L249', '_types.analysis.LetterTokenizer': '_types/analysis/tokenizers.ts#L67-L69', '_types.analysis.LimitTokenCountTokenFilter': '_types/analysis/token_filters.ts#L251-L255', +'_types.analysis.LithuanianAnalyzer': '_types/analysis/analyzers.ts#L230-L235', '_types.analysis.LowercaseNormalizer': '_types/analysis/normalizers.ts#L26-L28', '_types.analysis.LowercaseTokenFilter': '_types/analysis/token_filters.ts#L257-L260', '_types.analysis.LowercaseTokenizer': '_types/analysis/tokenizers.ts#L71-L73', @@ -588,40 +613,50 @@ '_types.analysis.MultiplexerTokenFilter': '_types/analysis/token_filters.ts#L262-L266', '_types.analysis.NGramTokenFilter': '_types/analysis/token_filters.ts#L268-L273', '_types.analysis.NGramTokenizer': '_types/analysis/tokenizers.ts#L39-L45', -'_types.analysis.NoriAnalyzer': '_types/analysis/analyzers.ts#L66-L72', +'_types.analysis.NoriAnalyzer': '_types/analysis/analyzers.ts#L312-L318', '_types.analysis.NoriDecompoundMode': '_types/analysis/tokenizers.ts#L75-L79', '_types.analysis.NoriPartOfSpeechTokenFilter': '_types/analysis/token_filters.ts#L275-L278', '_types.analysis.NoriTokenizer': '_types/analysis/tokenizers.ts#L81-L87', '_types.analysis.Normalizer': '_types/analysis/normalizers.ts#L20-L24', +'_types.analysis.NorwegianAnalyzer': '_types/analysis/analyzers.ts#L237-L242', '_types.analysis.PathHierarchyTokenizer': '_types/analysis/tokenizers.ts#L89-L96', -'_types.analysis.PatternAnalyzer': '_types/analysis/analyzers.ts#L74-L81', +'_types.analysis.PatternAnalyzer': '_types/analysis/analyzers.ts#L320-L327', '_types.analysis.PatternCaptureTokenFilter': '_types/analysis/token_filters.ts#L280-L284', '_types.analysis.PatternReplaceCharFilter': '_types/analysis/char_filters.ts#L54-L59', '_types.analysis.PatternReplaceTokenFilter': '_types/analysis/token_filters.ts#L286-L292', '_types.analysis.PatternTokenizer': '_types/analysis/tokenizers.ts#L98-L103', +'_types.analysis.PersianAnalyzer': '_types/analysis/analyzers.ts#L244-L248', '_types.analysis.PhoneticEncoder': '_types/analysis/phonetic-plugin.ts#L23-L36', '_types.analysis.PhoneticLanguage': '_types/analysis/phonetic-plugin.ts#L38-L51', '_types.analysis.PhoneticNameType': '_types/analysis/phonetic-plugin.ts#L53-L57', '_types.analysis.PhoneticRuleType': '_types/analysis/phonetic-plugin.ts#L59-L62', '_types.analysis.PhoneticTokenFilter': '_types/analysis/phonetic-plugin.ts#L64-L72', '_types.analysis.PorterStemTokenFilter': '_types/analysis/token_filters.ts#L294-L296', +'_types.analysis.PortugueseAnalyzer': '_types/analysis/analyzers.ts#L250-L255', '_types.analysis.PredicateTokenFilter': '_types/analysis/token_filters.ts#L298-L301', '_types.analysis.RemoveDuplicatesTokenFilter': '_types/analysis/token_filters.ts#L303-L305', '_types.analysis.ReverseTokenFilter': '_types/analysis/token_filters.ts#L307-L309', +'_types.analysis.RomanianAnalyzer': '_types/analysis/analyzers.ts#L257-L262', +'_types.analysis.RussianAnalyzer': '_types/analysis/analyzers.ts#L264-L269', +'_types.analysis.SerbianAnalyzer': '_types/analysis/analyzers.ts#L271-L276', '_types.analysis.ShingleTokenFilter': '_types/analysis/token_filters.ts#L87-L95', -'_types.analysis.SimpleAnalyzer': '_types/analysis/analyzers.ts#L83-L86', -'_types.analysis.SnowballAnalyzer': '_types/analysis/analyzers.ts#L88-L93', +'_types.analysis.SimpleAnalyzer': '_types/analysis/analyzers.ts#L329-L332', +'_types.analysis.SnowballAnalyzer': '_types/analysis/analyzers.ts#L334-L339', '_types.analysis.SnowballLanguage': '_types/analysis/languages.ts#L57-L80', '_types.analysis.SnowballTokenFilter': '_types/analysis/token_filters.ts#L311-L314', -'_types.analysis.StandardAnalyzer': '_types/analysis/analyzers.ts#L95-L99', +'_types.analysis.SoraniAnalyzer': '_types/analysis/analyzers.ts#L278-L283', +'_types.analysis.SpanishAnalyzer': '_types/analysis/analyzers.ts#L285-L290', +'_types.analysis.StandardAnalyzer': '_types/analysis/analyzers.ts#L341-L345', '_types.analysis.StandardTokenizer': '_types/analysis/tokenizers.ts#L105-L108', '_types.analysis.StemmerOverrideTokenFilter': '_types/analysis/token_filters.ts#L316-L320', '_types.analysis.StemmerTokenFilter': '_types/analysis/token_filters.ts#L322-L326', -'_types.analysis.StopAnalyzer': '_types/analysis/analyzers.ts#L101-L106', +'_types.analysis.StopAnalyzer': '_types/analysis/analyzers.ts#L347-L352', '_types.analysis.StopTokenFilter': '_types/analysis/token_filters.ts#L97-L103', +'_types.analysis.SwedishAnalyzer': '_types/analysis/analyzers.ts#L292-L297', '_types.analysis.SynonymFormat': '_types/analysis/token_filters.ts#L105-L108', '_types.analysis.SynonymGraphTokenFilter': '_types/analysis/token_filters.ts#L110-L120', '_types.analysis.SynonymTokenFilter': '_types/analysis/token_filters.ts#L122-L132', +'_types.analysis.ThaiAnalyzer': '_types/analysis/analyzers.ts#L306-L310', '_types.analysis.TokenChar': '_types/analysis/tokenizers.ts#L47-L54', '_types.analysis.TokenFilter': '_types/analysis/token_filters.ts#L346-L348', '_types.analysis.TokenFilterBase': '_types/analysis/token_filters.ts#L40-L42', @@ -631,10 +666,11 @@ '_types.analysis.TokenizerDefinition': '_types/analysis/tokenizers.ts#L124-L142', '_types.analysis.TrimTokenFilter': '_types/analysis/token_filters.ts#L328-L330', '_types.analysis.TruncateTokenFilter': '_types/analysis/token_filters.ts#L332-L335', +'_types.analysis.TurkishAnalyzer': '_types/analysis/analyzers.ts#L299-L304', '_types.analysis.UaxEmailUrlTokenizer': '_types/analysis/tokenizers.ts#L110-L113', '_types.analysis.UniqueTokenFilter': '_types/analysis/token_filters.ts#L337-L340', '_types.analysis.UppercaseTokenFilter': '_types/analysis/token_filters.ts#L342-L344', -'_types.analysis.WhitespaceAnalyzer': '_types/analysis/analyzers.ts#L108-L111', +'_types.analysis.WhitespaceAnalyzer': '_types/analysis/analyzers.ts#L354-L357', '_types.analysis.WhitespaceTokenizer': '_types/analysis/tokenizers.ts#L115-L118', '_types.analysis.WordDelimiterGraphTokenFilter': '_types/analysis/token_filters.ts#L151-L168', '_types.analysis.WordDelimiterTokenFilter': '_types/analysis/token_filters.ts#L134-L149', @@ -650,7 +686,7 @@ '_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L79-L87', '_types.mapping.DateProperty': '_types/mapping/core.ts#L67-L77', '_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32', -'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L26', +'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L27', '_types.mapping.DenseVectorProperty': '_types/mapping/complex.ts#L52-L59', '_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L51-L53', '_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L152-L155', @@ -726,27 +762,27 @@ '_types.query_dsl.CombinedFieldsZeroTerms': '_types/query_dsl/abstractions.ts#L514-L523', '_types.query_dsl.CommonTermsQuery': '_types/query_dsl/fulltext.ts#L34-L44', '_types.query_dsl.ConstantScoreQuery': '_types/query_dsl/compound.ts#L70-L77', -'_types.query_dsl.DateDecayFunction': '_types/query_dsl/compound.ts#L193-L193', +'_types.query_dsl.DateDecayFunction': '_types/query_dsl/compound.ts#L196-L196', '_types.query_dsl.DateDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L72-L75', '_types.query_dsl.DateRangeQuery': '_types/query_dsl/term.ts#L146-L155', -'_types.query_dsl.DecayFunction': '_types/query_dsl/compound.ts#L199-L208', -'_types.query_dsl.DecayFunctionBase': '_types/query_dsl/compound.ts#L175-L186', -'_types.query_dsl.DecayPlacement': '_types/query_dsl/compound.ts#L154-L173', +'_types.query_dsl.DecayFunction': '_types/query_dsl/compound.ts#L202-L211', +'_types.query_dsl.DecayFunctionBase': '_types/query_dsl/compound.ts#L178-L189', +'_types.query_dsl.DecayPlacement': '_types/query_dsl/compound.ts#L157-L176', '_types.query_dsl.DisMaxQuery': '_types/query_dsl/compound.ts#L79-L91', '_types.query_dsl.DistanceFeatureQuery': '_types/query_dsl/specialized.ts#L77-L85', '_types.query_dsl.DistanceFeatureQueryBase': '_types/query_dsl/specialized.ts#L40-L60', '_types.query_dsl.ExistsQuery': '_types/query_dsl/term.ts#L37-L42', '_types.query_dsl.FieldAndFormat': '_types/query_dsl/abstractions.ts#L525-L539', '_types.query_dsl.FieldLookup': '_types/query_dsl/abstractions.ts#L429-L446', -'_types.query_dsl.FieldValueFactorModifier': '_types/query_dsl/compound.ts#L307-L350', -'_types.query_dsl.FieldValueFactorScoreFunction': '_types/query_dsl/compound.ts#L133-L152', -'_types.query_dsl.FunctionBoostMode': '_types/query_dsl/compound.ts#L279-L305', -'_types.query_dsl.FunctionScoreContainer': '_types/query_dsl/compound.ts#L210-L250', -'_types.query_dsl.FunctionScoreMode': '_types/query_dsl/compound.ts#L252-L277', -'_types.query_dsl.FunctionScoreQuery': '_types/query_dsl/compound.ts#L93-L119', +'_types.query_dsl.FieldValueFactorModifier': '_types/query_dsl/compound.ts#L310-L353', +'_types.query_dsl.FieldValueFactorScoreFunction': '_types/query_dsl/compound.ts#L136-L155', +'_types.query_dsl.FunctionBoostMode': '_types/query_dsl/compound.ts#L282-L308', +'_types.query_dsl.FunctionScoreContainer': '_types/query_dsl/compound.ts#L213-L253', +'_types.query_dsl.FunctionScoreMode': '_types/query_dsl/compound.ts#L255-L280', +'_types.query_dsl.FunctionScoreQuery': '_types/query_dsl/compound.ts#L93-L122', '_types.query_dsl.FuzzyQuery': '_types/query_dsl/term.ts#L44-L79', '_types.query_dsl.GeoBoundingBoxQuery': '_types/query_dsl/geo.ts#L32-L53', -'_types.query_dsl.GeoDecayFunction': '_types/query_dsl/compound.ts#L194-L197', +'_types.query_dsl.GeoDecayFunction': '_types/query_dsl/compound.ts#L197-L200', '_types.query_dsl.GeoDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L67-L70', '_types.query_dsl.GeoDistanceQuery': '_types/query_dsl/geo.ts#L60-L91', '_types.query_dsl.GeoExecution': '_types/query_dsl/geo.ts#L55-L58', @@ -777,10 +813,10 @@ '_types.query_dsl.MatchQuery': '_types/query_dsl/fulltext.ts#L282-L347', '_types.query_dsl.MoreLikeThisQuery': '_types/query_dsl/specialized.ts#L87-L169', '_types.query_dsl.MultiMatchQuery': '_types/query_dsl/fulltext.ts#L456-L539', -'_types.query_dsl.MultiValueMode': '_types/query_dsl/compound.ts#L352-L369', +'_types.query_dsl.MultiValueMode': '_types/query_dsl/compound.ts#L355-L372', '_types.query_dsl.NestedQuery': '_types/query_dsl/joining.ts#L106-L130', '_types.query_dsl.NumberRangeQuery': '_types/query_dsl/term.ts#L157-L157', -'_types.query_dsl.NumericDecayFunction': '_types/query_dsl/compound.ts#L192-L192', +'_types.query_dsl.NumericDecayFunction': '_types/query_dsl/compound.ts#L195-L195', '_types.query_dsl.Operator': '_types/query_dsl/Operator.ts#L22-L27', '_types.query_dsl.ParentIdQuery': '_types/query_dsl/joining.ts#L132-L146', '_types.query_dsl.PercolateQuery': '_types/query_dsl/specialized.ts#L202-L239', @@ -790,7 +826,7 @@ '_types.query_dsl.QueryBase': '_types/query_dsl/abstractions.ts#L452-L463', '_types.query_dsl.QueryContainer': '_types/query_dsl/abstractions.ts#L102-L427', '_types.query_dsl.QueryStringQuery': '_types/query_dsl/fulltext.ts#L580-L700', -'_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L128-L131', +'_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L131-L134', '_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L161-L170', '_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L109-L133', '_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L172-L185', @@ -803,7 +839,7 @@ '_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L187-L217', '_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L381-L385', '_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L327-L333', -'_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L121-L126', +'_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L124-L129', '_types.query_dsl.ScriptScoreQuery': '_types/query_dsl/specialized.ts#L335-L349', '_types.query_dsl.SemanticQuery': '_types/query_dsl/SemanticQuery.ts#L22-L27', '_types.query_dsl.ShapeFieldQuery': '_types/query_dsl/specialized.ts#L366-L379', @@ -831,7 +867,7 @@ '_types.query_dsl.TextQueryType': '_types/query_dsl/fulltext.ts#L541-L567', '_types.query_dsl.TokenPruningConfig': '_types/query_dsl/TokenPruningConfig.ts#L22-L35', '_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L269-L271', -'_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L188-L191', +'_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L191-L194', '_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L62-L65', '_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L135-L144', '_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L27-L32', @@ -857,64 +893,147 @@ 'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L561-L635', 'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L640-L844', 'cat.aliases.AliasesRecord': 'cat/aliases/types.ts#L22-L53', -'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L41', +'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L43', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L24', 'cat.component_templates.ComponentTemplate': 'cat/component_templates/types.ts#L20-L28', -'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L37', +'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L39', 'cat.component_templates.Response': 'cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24', 'cat.count.CountRecord': 'cat/count/types.ts#L23-L39', -'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L42', +'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L44', 'cat.count.Response': 'cat/count/CatCountResponse.ts#L22-L24', 'cat.help.HelpRecord': 'cat/help/types.ts#L20-L22', -'cat.help.Request': 'cat/help/CatHelpRequest.ts#L22-L28', +'cat.help.Request': 'cat/help/CatHelpRequest.ts#L22-L30', 'cat.help.Response': 'cat/help/CatHelpResponse.ts#L22-L24', 'cat.indices.IndicesRecord': 'cat/indices/types.ts#L20-L801', -'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L68', +'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L77', 'cat.indices.Response': 'cat/indices/CatIndicesResponse.ts#L22-L24', 'cat.ml_data_frame_analytics.DataFrameAnalyticsRecord': 'cat/ml_data_frame_analytics/types.ts#L22-L102', -'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L58', +'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L59', 'cat.ml_data_frame_analytics.Response': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24', 'cat.ml_datafeeds.DatafeedsRecord': 'cat/ml_datafeeds/types.ts#L22-L87', -'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L24-L73', +'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L24-L74', 'cat.ml_datafeeds.Response': 'cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24', 'cat.ml_jobs.JobsRecord': 'cat/ml_jobs/types.ts#L24-L347', -'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L24-L77', +'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L24-L78', 'cat.ml_jobs.Response': 'cat/ml_jobs/CatJobsResponse.ts#L22-L24', -'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L24-L63', +'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L24-L64', 'cat.ml_trained_models.Response': 'cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24', 'cat.ml_trained_models.TrainedModelsRecord': 'cat/ml_trained_models/types.ts#L23-L115', -'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L77', +'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L78', 'cat.transforms.Response': 'cat/transforms/CatTransformsResponse.ts#L22-L24', 'cat.transforms.TransformsRecord': 'cat/transforms/types.ts#L22-L197', 'cluster._types.ComponentTemplate': 'cluster/_types/ComponentTemplate.ts#L30-L33', 'cluster._types.ComponentTemplateNode': 'cluster/_types/ComponentTemplate.ts#L35-L40', 'cluster._types.ComponentTemplateSummary': 'cluster/_types/ComponentTemplate.ts#L42-L54', -'cluster.delete_component_template.Request': 'cluster/delete_component_template/ClusterDeleteComponentTemplateRequest.ts#L24-L54', +'cluster.delete_component_template.Request': 'cluster/delete_component_template/ClusterDeleteComponentTemplateRequest.ts#L24-L55', 'cluster.delete_component_template.Response': 'cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24', -'cluster.exists_component_template.Request': 'cluster/exists_component_template/ClusterComponentTemplateExistsRequest.ts#L24-L53', -'cluster.get_component_template.Request': 'cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L65', +'cluster.exists_component_template.Request': 'cluster/exists_component_template/ClusterComponentTemplateExistsRequest.ts#L24-L55', +'cluster.get_component_template.Request': 'cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L66', 'cluster.get_component_template.Response': 'cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24', -'cluster.info.Request': 'cluster/info/ClusterInfoRequest.ts#L23-L34', +'cluster.info.Request': 'cluster/info/ClusterInfoRequest.ts#L23-L36', 'cluster.info.Response': 'cluster/info/ClusterInfoResponse.ts#L26-L34', -'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L93', +'cluster.put_component_template.Request': 'cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L94', 'cluster.put_component_template.Response': 'cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24', +'connector._types.Connector': 'connector/_types/Connector.ts#L237-L268', +'connector._types.ConnectorConfigProperties': 'connector/_types/Connector.ts#L83-L99', +'connector._types.ConnectorFeatures': 'connector/_types/Connector.ts#L224-L229', +'connector._types.ConnectorFieldType': 'connector/_types/Connector.ts#L43-L48', +'connector._types.ConnectorScheduling': 'connector/_types/Connector.ts#L106-L110', +'connector._types.ConnectorStatus': 'connector/_types/Connector.ts#L130-L136', +'connector._types.ConnectorSyncJob': 'connector/_types/SyncJob.ts#L53-L72', +'connector._types.CustomScheduling': 'connector/_types/Connector.ts#L120-L126', +'connector._types.CustomSchedulingConfigurationOverrides': 'connector/_types/Connector.ts#L112-L118', +'connector._types.Dependency': 'connector/_types/Connector.ts#L30-L33', +'connector._types.DisplayType': 'connector/_types/Connector.ts#L35-L41', +'connector._types.FeatureEnabled': 'connector/_types/Connector.ts#L215-L217', +'connector._types.FilteringAdvancedSnippet': 'connector/_types/Connector.ts#L192-L196', +'connector._types.FilteringConfig': 'connector/_types/Connector.ts#L209-L213', +'connector._types.FilteringPolicy': 'connector/_types/Connector.ts#L155-L158', +'connector._types.FilteringRule': 'connector/_types/Connector.ts#L170-L179', +'connector._types.FilteringRuleRule': 'connector/_types/Connector.ts#L160-L168', +'connector._types.FilteringRules': 'connector/_types/Connector.ts#L203-L207', +'connector._types.FilteringRulesValidation': 'connector/_types/Connector.ts#L198-L201', +'connector._types.FilteringValidation': 'connector/_types/Connector.ts#L181-L184', +'connector._types.FilteringValidationState': 'connector/_types/Connector.ts#L186-L190', +'connector._types.GreaterThanValidation': 'connector/_types/Connector.ts#L63-L66', +'connector._types.IncludedInValidation': 'connector/_types/Connector.ts#L73-L76', +'connector._types.IngestPipelineParams': 'connector/_types/Connector.ts#L148-L153', +'connector._types.LessThanValidation': 'connector/_types/Connector.ts#L58-L61', +'connector._types.ListTypeValidation': 'connector/_types/Connector.ts#L68-L71', +'connector._types.RegexValidation': 'connector/_types/Connector.ts#L78-L81', +'connector._types.SchedulingConfiguration': 'connector/_types/Connector.ts#L231-L235', +'connector._types.SelectOption': 'connector/_types/Connector.ts#L25-L28', +'connector._types.SyncJobConnectorReference': 'connector/_types/SyncJob.ts#L31-L40', +'connector._types.SyncJobTriggerMethod': 'connector/_types/SyncJob.ts#L48-L51', +'connector._types.SyncJobType': 'connector/_types/SyncJob.ts#L42-L46', +'connector._types.SyncRulesFeature': 'connector/_types/Connector.ts#L219-L222', +'connector._types.SyncStatus': 'connector/_types/Connector.ts#L138-L146', +'connector._types.Validation': 'connector/_types/Connector.ts#L50-L56', +'connector.check_in.Request': 'connector/check_in/ConnectorCheckInRequest.ts#L22-L36', +'connector.check_in.Response': 'connector/check_in/ConnectorCheckInResponse.ts#L22-L26', +'connector.delete.Request': 'connector/delete/ConnectorDeleteRequest.ts#L22-L42', +'connector.delete.Response': 'connector/delete/ConnectorDeleteResponse.ts#L22-L24', +'connector.get.Request': 'connector/get/ConnectorGetRequest.ts#L22-L36', +'connector.get.Response': 'connector/get/ConnectorGetResponse.ts#L22-L24', +'connector.list.Request': 'connector/list/ConnectorListRequest.ts#L23-L57', +'connector.list.Response': 'connector/list/ConnectorListResponse.ts#L23-L28', +'connector.post.Request': 'connector/post/ConnectorPostRequest.ts#L22-L42', +'connector.post.Response': 'connector/post/ConnectorPostResponse.ts#L23-L28', +'connector.put.Request': 'connector/put/ConnectorPutRequest.ts#L22-L48', +'connector.put.Response': 'connector/put/ConnectorPutResponse.ts#L23-L28', +'connector.sync_job_cancel.Request': 'connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L36', +'connector.sync_job_cancel.Response': 'connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26', +'connector.sync_job_delete.Request': 'connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L36', +'connector.sync_job_delete.Response': 'connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24', +'connector.sync_job_get.Request': 'connector/sync_job_get/SyncJobGetRequest.ts#L22-L36', +'connector.sync_job_get.Response': 'connector/sync_job_get/SyncJobGetResponse.ts#L22-L24', +'connector.sync_job_list.Request': 'connector/sync_job_list/SyncJobListRequest.ts#L25-L55', +'connector.sync_job_list.Response': 'connector/sync_job_list/SyncJobListResponse.ts#L23-L28', +'connector.sync_job_post.Request': 'connector/sync_job_post/SyncJobPostRequest.ts#L23-L43', +'connector.sync_job_post.Response': 'connector/sync_job_post/SyncJobPostResponse.ts#L22-L26', +'connector.update_active_filtering.Request': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L36', +'connector.update_active_filtering.Response': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26', +'connector.update_api_key_id.Request': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42', +'connector.update_api_key_id.Response': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26', +'connector.update_configuration.Request': 'connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47', +'connector.update_configuration.Response': 'connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26', +'connector.update_error.Request': 'connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44', +'connector.update_error.Response': 'connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26', +'connector.update_filtering.Request': 'connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50', +'connector.update_filtering.Response': 'connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26', +'connector.update_filtering_validation.Request': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40', +'connector.update_filtering_validation.Response': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26', +'connector.update_index_name.Request': 'connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43', +'connector.update_index_name.Response': 'connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26', +'connector.update_name.Request': 'connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43', +'connector.update_name.Response': 'connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26', +'connector.update_native.Request': 'connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42', +'connector.update_native.Response': 'connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26', +'connector.update_pipeline.Request': 'connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44', +'connector.update_pipeline.Response': 'connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26', +'connector.update_scheduling.Request': 'connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44', +'connector.update_scheduling.Response': 'connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26', +'connector.update_service_type.Request': 'connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42', +'connector.update_service_type.Response': 'connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26', +'connector.update_status.Request': 'connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43', +'connector.update_status.Response': 'connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26', 'enrich._types.Policy': 'enrich/_types/Policy.ts#L34-L41', 'enrich._types.PolicyType': 'enrich/_types/Policy.ts#L28-L32', 'enrich._types.Summary': 'enrich/_types/Policy.ts#L24-L26', -'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L36', +'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L37', 'enrich.delete_policy.Response': 'enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24', 'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L24-L29', 'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L22', 'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L44', 'enrich.execute_policy.Response': 'enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28', -'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L37', +'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L38', 'enrich.get_policy.Response': 'enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24', -'enrich.put_policy.Request': 'enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L52', +'enrich.put_policy.Request': 'enrich/put_policy/PutEnrichPolicyRequest.ts#L24-L53', 'enrich.put_policy.Response': 'enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24', 'enrich.stats.CacheStats': 'enrich/stats/types.ts#L37-L43', 'enrich.stats.CoordinatorStats': 'enrich/stats/types.ts#L29-L35', 'enrich.stats.ExecutingPolicy': 'enrich/stats/types.ts#L24-L27', -'enrich.stats.Request': 'enrich/stats/EnrichStatsRequest.ts#L22-L28', +'enrich.stats.Request': 'enrich/stats/EnrichStatsRequest.ts#L22-L29', 'enrich.stats.Response': 'enrich/stats/EnrichStatsResponse.ts#L22-L39', 'eql._types.EqlHits': 'eql/_types/EqlHits.ts#L25-L39', 'eql._types.EqlSearchResponseBase': 'eql/_types/EqlSearchResponseBase.ts#L25-L50', @@ -929,7 +1048,8 @@ 'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L28-L118', 'eql.search.Response': 'eql/search/EqlSearchResponse.ts#L22-L24', 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', -'esql.query.Request': 'esql/query/QueryRequest.ts#L24-L76', +'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28', +'esql.query.Request': 'esql/query/QueryRequest.ts#L26-L89', 'esql.query.Response': 'esql/query/QueryResponse.ts#L22-L25', 'graph._types.Connection': 'graph/_types/Connection.ts#L22-L27', 'graph._types.ExploreControls': 'graph/_types/ExploreControls.ts#L24-L49', @@ -943,16 +1063,17 @@ 'indices._types.Alias': 'indices/_types/Alias.ts#L23-L53', 'indices._types.AliasDefinition': 'indices/_types/AliasDefinition.ts#L22-L54', 'indices._types.CacheQueries': 'indices/_types/IndexSettings.ts#L407-L409', -'indices._types.DataStream': 'indices/_types/DataStream.ts#L39-L112', -'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L121-L142', +'indices._types.DataStream': 'indices/_types/DataStream.ts#L45-L127', +'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L136-L157', 'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L25-L31', 'indices._types.DataStreamLifecycleDownsampling': 'indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27', 'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L57-L69', 'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L33-L55', -'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L114-L119', -'indices._types.DataStreamVisibility': 'indices/_types/DataStream.ts#L144-L146', +'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L129-L134', +'indices._types.DataStreamVisibility': 'indices/_types/DataStream.ts#L159-L161', 'indices._types.DownsampleConfig': 'indices/_types/Downsample.ts#L22-L27', 'indices._types.DownsamplingRound': 'indices/_types/DownsamplingRound.ts#L23-L32', +'indices._types.FailureStore': 'indices/_types/DataStream.ts#L39-L43', 'indices._types.FielddataFrequencyFilter': 'indices/_types/FielddataFrequencyFilter.ts#L22-L26', 'indices._types.IndexCheckOnStartup': 'indices/_types/IndexSettings.ts#L262-L269', 'indices._types.IndexRouting': 'indices/_types/IndexRouting.ts#L22-L25', @@ -1019,9 +1140,9 @@ 'indices._types.Translog': 'indices/_types/IndexSettings.ts#L341-L363', 'indices._types.TranslogDurability': 'indices/_types/IndexSettings.ts#L365-L380', 'indices._types.TranslogRetention': 'indices/_types/IndexSettings.ts#L382-L401', -'indices.add_block.IndicesBlockOptions': 'indices/add_block/IndicesAddBlockRequest.ts#L43-L48', +'indices.add_block.IndicesBlockOptions': 'indices/add_block/IndicesAddBlockRequest.ts#L45-L50', 'indices.add_block.IndicesBlockStatus': 'indices/add_block/IndicesAddBlockResponse.ts#L30-L33', -'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L24-L41', +'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L24-L43', 'indices.add_block.Response': 'indices/add_block/IndicesAddBlockResponse.ts#L22-L28', 'indices.analyze.AnalyzeDetail': 'indices/analyze/types.ts#L24-L30', 'indices.analyze.AnalyzeToken': 'indices/analyze/types.ts#L37-L44', @@ -1031,68 +1152,68 @@ 'indices.analyze.Request': 'indices/analyze/IndicesAnalyzeRequest.ts#L27-L92', 'indices.analyze.Response': 'indices/analyze/IndicesAnalyzeResponse.ts#L22-L27', 'indices.analyze.TokenDetail': 'indices/analyze/types.ts#L71-L74', -'indices.create.Request': 'indices/create/IndicesCreateRequest.ts#L28-L81', +'indices.create.Request': 'indices/create/IndicesCreateRequest.ts#L28-L82', 'indices.create.Response': 'indices/create/IndicesCreateResponse.ts#L22-L28', -'indices.create_data_stream.Request': 'indices/create_data_stream/IndicesCreateDataStreamRequest.ts#L23-L43', +'indices.create_data_stream.Request': 'indices/create_data_stream/IndicesCreateDataStreamRequest.ts#L24-L57', 'indices.create_data_stream.Response': 'indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24', 'indices.data_streams_stats.DataStreamsStatsItem': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65', -'indices.data_streams_stats.Request': 'indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts#L23-L47', +'indices.data_streams_stats.Request': 'indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts#L23-L48', 'indices.data_streams_stats.Response': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43', -'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L73', +'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L74', 'indices.delete.Response': 'indices/delete/IndicesDeleteResponse.ts#L22-L24', -'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L57', +'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L58', 'indices.delete_alias.Response': 'indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24', -'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L39', +'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L40', 'indices.delete_data_lifecycle.Response': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24', -'indices.delete_data_stream.Request': 'indices/delete_data_stream/IndicesDeleteDataStreamRequest.ts#L23-L44', +'indices.delete_data_stream.Request': 'indices/delete_data_stream/IndicesDeleteDataStreamRequest.ts#L24-L51', 'indices.delete_data_stream.Response': 'indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24', 'indices.delete_index_template.Request': 'indices/delete_index_template/IndicesDeleteIndexTemplateRequest.ts#L24-L53', 'indices.delete_index_template.Response': 'indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24', -'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L72', -'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L67', +'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L73', +'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L68', 'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L41', 'indices.explain_data_lifecycle.DataStreamLifecycleExplain': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41', -'indices.explain_data_lifecycle.Request': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleRequest.ts#L24-L38', +'indices.explain_data_lifecycle.Request': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleRequest.ts#L24-L39', 'indices.explain_data_lifecycle.Response': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29', -'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L90-L94', -'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L88', +'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L91-L95', +'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L89', 'indices.get.Response': 'indices/get/IndicesGetResponse.ts#L24-L27', 'indices.get_alias.IndexAliases': 'indices/get_alias/IndicesGetAliasResponse.ts#L37-L39', -'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L70', +'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L71', 'indices.get_alias.Response': 'indices/get_alias/IndicesGetAliasResponse.ts#L26-L35', 'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30', -'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L23-L52', +'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L24-L59', 'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25', -'indices.get_data_stream.Request': 'indices/get_data_stream/IndicesGetDataStreamRequest.ts#L23-L53', +'indices.get_data_stream.Request': 'indices/get_data_stream/IndicesGetDataStreamRequest.ts#L24-L60', 'indices.get_data_stream.Response': 'indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24', 'indices.get_index_template.IndexTemplateItem': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32', 'indices.get_index_template.Request': 'indices/get_index_template/IndicesGetIndexTemplateRequest.ts#L24-L61', 'indices.get_index_template.Response': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27', 'indices.get_mapping.IndexMappingRecord': 'indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32', -'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L72', +'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L73', 'indices.get_mapping.Response': 'indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27', -'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L91', +'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L92', 'indices.get_settings.Response': 'indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27', -'indices.migrate_to_data_stream.Request': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamRequest.ts#L23-L44', +'indices.migrate_to_data_stream.Request': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamRequest.ts#L24-L58', 'indices.migrate_to_data_stream.Response': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24', 'indices.modify_data_stream.Action': 'indices/modify_data_stream/types.ts#L22-L37', 'indices.modify_data_stream.IndexAndDataStreamAction': 'indices/modify_data_stream/types.ts#L39-L44', -'indices.modify_data_stream.Request': 'indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L36', +'indices.modify_data_stream.Request': 'indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L37', 'indices.modify_data_stream.Response': 'indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24', -'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L91', +'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L92', 'indices.put_alias.Response': 'indices/put_alias/IndicesPutAliasResponse.ts#L22-L24', -'indices.put_data_lifecycle.Request': 'indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L75', +'indices.put_data_lifecycle.Request': 'indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L76', 'indices.put_data_lifecycle.Response': 'indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24', 'indices.put_index_template.IndexTemplateMapping': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L121-L143', 'indices.put_index_template.Request': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L119', 'indices.put_index_template.Response': 'indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24', -'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L42-L149', +'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L42-L150', 'indices.put_mapping.Response': 'indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24', -'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L92', +'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L93', 'indices.put_settings.Response': 'indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24', 'indices.put_template.Request': 'indices/put_template/IndicesPutTemplateRequest.ts#L29-L95', 'indices.put_template.Response': 'indices/put_template/IndicesPutTemplateResponse.ts#L22-L24', -'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L60', +'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L61', 'indices.refresh.Response': 'indices/refresh/IndicesRefreshResponse.ts#L22-L24', 'indices.reload_search_analyzers.ReloadDetails': 'indices/reload_search_analyzers/types.ts#L27-L31', 'indices.reload_search_analyzers.ReloadResult': 'indices/reload_search_analyzers/types.ts#L22-L25', @@ -1101,7 +1222,7 @@ 'indices.resolve_index.ResolveIndexDataStreamsItem': 'indices/resolve_index/ResolveIndexResponse.ts#L42-L46', 'indices.resolve_index.ResolveIndexItem': 'indices/resolve_index/ResolveIndexResponse.ts#L30-L35', 'indices.resolve_index.Response': 'indices/resolve_index/ResolveIndexResponse.ts#L22-L28', -'indices.rollover.Request': 'indices/rollover/IndicesRolloverRequest.ts#L29-L99', +'indices.rollover.Request': 'indices/rollover/IndicesRolloverRequest.ts#L29-L100', 'indices.rollover.Response': 'indices/rollover/IndicesRolloverResponse.ts#L22-L32', 'indices.rollover.RolloverConditions': 'indices/rollover/types.ts#L24-L40', 'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L24-L50', @@ -1114,10 +1235,10 @@ 'indices.update_aliases.AddAction': 'indices/update_aliases/types.ts#L41-L95', 'indices.update_aliases.RemoveAction': 'indices/update_aliases/types.ts#L97-L122', 'indices.update_aliases.RemoveIndexAction': 'indices/update_aliases/types.ts#L124-L139', -'indices.update_aliases.Request': 'indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L51', +'indices.update_aliases.Request': 'indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L52', 'indices.update_aliases.Response': 'indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24', 'indices.validate_query.IndicesValidationExplanation': 'indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37', -'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L111', +'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L112', 'indices.validate_query.Response': 'indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30', 'inference._types.CompletionResult': 'inference/_types/Results.ts#L60-L65', 'inference._types.DeleteInferenceEndpointResult': 'inference/_types/Results.ts#L91-L96', @@ -1199,7 +1320,7 @@ 'license._types.LicenseStatus': 'license/_types/License.ts#L35-L40', 'license._types.LicenseType': 'license/_types/License.ts#L23-L33', 'license.get.LicenseInformation': 'license/get/types.ts#L25-L38', -'license.get.Request': 'license/get/GetLicenseRequest.ts#L22-L44', +'license.get.Request': 'license/get/GetLicenseRequest.ts#L22-L45', 'license.get.Response': 'license/get/GetLicenseResponse.ts#L22-L24', 'logstash._types.Pipeline': 'logstash/_types/Pipeline.ts#L60-L92', 'logstash._types.PipelineMetadata': 'logstash/_types/Pipeline.ts#L23-L26', @@ -1284,7 +1405,7 @@ 'ml._types.Include': 'ml/_types/Include.ts#L20-L47', 'ml._types.InferenceConfigCreateContainer': 'ml/_types/inference.ts#L23-L80', 'ml._types.InferenceConfigUpdateContainer': 'ml/_types/inference.ts#L296-L318', -'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L459-L506', +'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L459-L507', 'ml._types.Job': 'ml/_types/Job.ts#L61-L180', 'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395', 'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L397-L401', @@ -1356,7 +1477,7 @@ 'ml._types.ZeroShotClassificationInferenceUpdateOptions': 'ml/_types/inference.ts#L374-L383', 'ml.close_job.Request': 'ml/close_job/MlCloseJobRequest.ts#L24-L77', 'ml.close_job.Response': 'ml/close_job/MlCloseJobResponse.ts#L20-L22', -'ml.delete_calendar.Request': 'ml/delete_calendar/MlDeleteCalendarRequest.ts#L23-L36', +'ml.delete_calendar.Request': 'ml/delete_calendar/MlDeleteCalendarRequest.ts#L23-L37', 'ml.delete_calendar.Response': 'ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24', 'ml.delete_calendar_event.Request': 'ml/delete_calendar_event/MlDeleteCalendarEventRequest.ts#L23-L42', 'ml.delete_calendar_event.Response': 'ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24', @@ -1374,7 +1495,7 @@ 'ml.delete_trained_model.Response': 'ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24', 'ml.delete_trained_model_alias.Request': 'ml/delete_trained_model_alias/MlDeleteTrainedModelAliasRequest.ts#L23-L44', 'ml.delete_trained_model_alias.Response': 'ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24', -'ml.estimate_model_memory.Request': 'ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L61', +'ml.estimate_model_memory.Request': 'ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L62', 'ml.estimate_model_memory.Response': 'ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24', 'ml.evaluate_data_frame.ConfusionMatrixItem': 'ml/evaluate_data_frame/types.ts#L125-L130', 'ml.evaluate_data_frame.ConfusionMatrixPrediction': 'ml/evaluate_data_frame/types.ts#L132-L135', @@ -1413,20 +1534,20 @@ 'ml.get_job_stats.Response': 'ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28', 'ml.get_jobs.Request': 'ml/get_jobs/MlGetJobsRequest.ts#L23-L66', 'ml.get_jobs.Response': 'ml/get_jobs/MlGetJobsResponse.ts#L23-L28', -'ml.get_overall_buckets.Request': 'ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L143', +'ml.get_overall_buckets.Request': 'ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L145', 'ml.get_overall_buckets.Response': 'ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29', 'ml.get_trained_models.Request': 'ml/get_trained_models/MlGetTrainedModelRequest.ts#L25-L91', 'ml.get_trained_models.Response': 'ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34', -'ml.get_trained_models_stats.Request': 'ml/get_trained_models_stats/MlGetTrainedModelStatsRequest.ts#L24-L64', +'ml.get_trained_models_stats.Request': 'ml/get_trained_models_stats/MlGetTrainedModelStatsRequest.ts#L24-L65', 'ml.get_trained_models_stats.Response': 'ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33', 'ml.infer_trained_model.Request': 'ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L59', 'ml.infer_trained_model.Response': 'ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26', -'ml.open_job.Request': 'ml/open_job/MlOpenJobRequest.ts#L24-L59', +'ml.open_job.Request': 'ml/open_job/MlOpenJobRequest.ts#L24-L58', 'ml.open_job.Response': 'ml/open_job/MlOpenJobResponse.ts#L22-L31', 'ml.post_calendar_events.Request': 'ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L40', 'ml.post_calendar_events.Response': 'ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24', 'ml.preview_data_frame_analytics.DataframePreviewConfig': 'ml/preview_data_frame_analytics/types.ts#L27-L33', -'ml.preview_data_frame_analytics.Request': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L47', +'ml.preview_data_frame_analytics.Request': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L48', 'ml.preview_data_frame_analytics.Response': 'ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28', 'ml.preview_datafeed.Request': 'ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L69', 'ml.preview_datafeed.Response': 'ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23', @@ -1449,14 +1570,14 @@ 'ml.put_trained_model.Input': 'ml/put_trained_model/types.ts#L56-L58', 'ml.put_trained_model.OneHotEncodingPreprocessor': 'ml/put_trained_model/types.ts#L44-L47', 'ml.put_trained_model.Preprocessor': 'ml/put_trained_model/types.ts#L31-L36', -'ml.put_trained_model.Request': 'ml/put_trained_model/MlPutTrainedModelRequest.ts#L29-L124', +'ml.put_trained_model.Request': 'ml/put_trained_model/MlPutTrainedModelRequest.ts#L29-L125', 'ml.put_trained_model.Response': 'ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24', 'ml.put_trained_model.TargetMeanEncodingPreprocessor': 'ml/put_trained_model/types.ts#L49-L54', 'ml.put_trained_model.TrainedModel': 'ml/put_trained_model/types.ts#L60-L72', 'ml.put_trained_model.TrainedModelTree': 'ml/put_trained_model/types.ts#L74-L79', 'ml.put_trained_model.TrainedModelTreeNode': 'ml/put_trained_model/types.ts#L81-L91', 'ml.put_trained_model.Weights': 'ml/put_trained_model/types.ts#L108-L110', -'ml.put_trained_model_alias.Request': 'ml/put_trained_model_alias/MlPutTrainedModelAliasRequest.ts#L23-L65', +'ml.put_trained_model_alias.Request': 'ml/put_trained_model_alias/MlPutTrainedModelAliasRequest.ts#L23-L66', 'ml.put_trained_model_alias.Response': 'ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24', 'ml.put_trained_model_definition_part.Request': 'ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L57', 'ml.put_trained_model_definition_part.Response': 'ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24', @@ -1468,7 +1589,7 @@ 'ml.start_data_frame_analytics.Response': 'ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34', 'ml.start_datafeed.Request': 'ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L91', 'ml.start_datafeed.Response': 'ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34', -'ml.start_trained_model_deployment.Request': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L92', +'ml.start_trained_model_deployment.Request': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L93', 'ml.start_trained_model_deployment.Response': 'ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26', 'ml.stop_data_frame_analytics.Request': 'ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts#L24-L70', 'ml.stop_data_frame_analytics.Response': 'ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22', @@ -1480,9 +1601,9 @@ 'ml.update_data_frame_analytics.Response': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45', 'ml.update_datafeed.Request': 'ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L162', 'ml.update_datafeed.Response': 'ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49', -'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L51', +'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L52', 'ml.update_filter.Response': 'ml/update_filter/MlUpdateFilterResponse.ts#L22-L28', -'ml.update_job.Request': 'ml/update_job/MlUpdateJobRequest.ts#L33-L138', +'ml.update_job.Request': 'ml/update_job/MlUpdateJobRequest.ts#L33-L139', 'ml.update_job.Response': 'ml/update_job/MlUpdateJobResponse.ts#L29-L53', 'ml.update_trained_model_deployment.Request': 'ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L24-L62', 'ml.update_trained_model_deployment.Response': 'ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26', @@ -1496,10 +1617,10 @@ 'nodes._types.Scripting': 'nodes/_types/Stats.ts#L977-L995', 'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1004-L1029', 'query_rules._types.QueryRule': 'query_rules/_types/QueryRuleset.ts#L36-L42', -'query_rules._types.QueryRuleActions': 'query_rules/_types/QueryRuleset.ts#L69-L72', -'query_rules._types.QueryRuleCriteria': 'query_rules/_types/QueryRuleset.ts#L48-L52', -'query_rules._types.QueryRuleCriteriaType': 'query_rules/_types/QueryRuleset.ts#L54-L67', -'query_rules._types.QueryRuleType': 'query_rules/_types/QueryRuleset.ts#L44-L46', +'query_rules._types.QueryRuleActions': 'query_rules/_types/QueryRuleset.ts#L70-L73', +'query_rules._types.QueryRuleCriteria': 'query_rules/_types/QueryRuleset.ts#L49-L53', +'query_rules._types.QueryRuleCriteriaType': 'query_rules/_types/QueryRuleset.ts#L55-L68', +'query_rules._types.QueryRuleType': 'query_rules/_types/QueryRuleset.ts#L44-L47', 'query_rules._types.QueryRuleset': 'query_rules/_types/QueryRuleset.ts#L25-L34', 'query_rules.delete_rule.Request': 'query_rules/delete_rule/QueryRuleDeleteRequest.ts#L22-L40', 'query_rules.delete_rule.Response': 'query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24', @@ -1548,26 +1669,26 @@ 'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L28-L61', 'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L289-L290', 'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L269-L287', -'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L22-L30', +'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L22-L32', 'security.authenticate.Response': 'security/authenticate/SecurityAuthenticateResponse.ts#L25-L43', 'security.authenticate.Token': 'security/authenticate/types.ts#L22-L29', -'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L58', +'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L59', 'security.create_api_key.Response': 'security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50', -'security.get_api_key.Request': 'security/get_api_key/SecurityGetApiKeyRequest.ts#L23-L86', +'security.get_api_key.Request': 'security/get_api_key/SecurityGetApiKeyRequest.ts#L23-L87', 'security.get_api_key.Response': 'security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24', 'security.has_privileges.ApplicationPrivilegesCheck': 'security/has_privileges/types.ts#L24-L31', 'security.has_privileges.IndexPrivilegesCheck': 'security/has_privileges/types.ts#L33-L44', -'security.has_privileges.Request': 'security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L42', +'security.has_privileges.Request': 'security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L44', 'security.has_privileges.Response': 'security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L32', -'security.invalidate_api_key.Request': 'security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L66', +'security.invalidate_api_key.Request': 'security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L67', 'security.invalidate_api_key.Response': 'security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L30', 'security.query_api_keys.ApiKeyAggregate': 'security/query_api_keys/types.ts#L123-L140', 'security.query_api_keys.ApiKeyAggregationContainer': 'security/query_api_keys/types.ts#L64-L121', 'security.query_api_keys.ApiKeyFiltersAggregation': 'security/query_api_keys/types.ts#L208-L228', 'security.query_api_keys.ApiKeyQueryContainer': 'security/query_api_keys/types.ts#L142-L206', -'security.query_api_keys.Request': 'security/query_api_keys/QueryApiKeysRequest.ts#L26-L99', +'security.query_api_keys.Request': 'security/query_api_keys/QueryApiKeysRequest.ts#L26-L100', 'security.query_api_keys.Response': 'security/query_api_keys/QueryApiKeysResponse.ts#L26-L45', -'security.update_api_key.Request': 'security/update_api_key/Request.ts#L26-L65', +'security.update_api_key.Request': 'security/update_api_key/Request.ts#L26-L66', 'security.update_api_key.Response': 'security/update_api_key/Response.ts#L20-L28', 'sql.Column': 'sql/types.ts#L23-L26', 'sql.clear_cursor.Request': 'sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L34', @@ -1601,7 +1722,7 @@ 'synonyms.put_synonym_rule.Request': 'synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L47', 'synonyms.put_synonym_rule.Response': 'synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24', 'tasks._types.TaskInfo': 'tasks/_types/TaskInfo.ts#L32-L47', -'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L50', +'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L52', 'tasks.get.Response': 'tasks/get/GetTaskResponse.ts#L24-L31', 'transform._types.Destination': 'transform/_types/Transform.ts#L34-L45', 'transform._types.Latest': 'transform/_types/Transform.ts#L47-L52', @@ -1613,32 +1734,32 @@ 'transform._types.Source': 'transform/_types/Transform.ts#L146-L165', 'transform._types.SyncContainer': 'transform/_types/Transform.ts#L169-L175', 'transform._types.TimeSync': 'transform/_types/Transform.ts#L177-L189', -'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L57', +'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L58', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L24', -'transform.get_transform.Request': 'transform/get_transform/GetTransformRequest.ts#L24-L72', +'transform.get_transform.Request': 'transform/get_transform/GetTransformRequest.ts#L24-L73', 'transform.get_transform.Response': 'transform/get_transform/GetTransformResponse.ts#L23-L25', 'transform.get_transform.TransformSummary': 'transform/get_transform/types.ts#L33-L61', 'transform.get_transform_stats.CheckpointStats': 'transform/get_transform_stats/types.ts#L76-L83', 'transform.get_transform_stats.Checkpointing': 'transform/get_transform_stats/types.ts#L85-L92', -'transform.get_transform_stats.Request': 'transform/get_transform_stats/GetTransformStatsRequest.ts#L25-L68', +'transform.get_transform_stats.Request': 'transform/get_transform_stats/GetTransformStatsRequest.ts#L25-L69', 'transform.get_transform_stats.Response': 'transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25', 'transform.get_transform_stats.TransformIndexerStats': 'transform/get_transform_stats/types.ts#L56-L74', 'transform.get_transform_stats.TransformProgress': 'transform/get_transform_stats/types.ts#L48-L54', 'transform.get_transform_stats.TransformStats': 'transform/get_transform_stats/types.ts#L31-L42', 'transform.get_transform_stats.TransformStatsHealth': 'transform/get_transform_stats/types.ts#L44-L46', -'transform.preview_transform.Request': 'transform/preview_transform/PreviewTransformRequest.ts#L33-L107', +'transform.preview_transform.Request': 'transform/preview_transform/PreviewTransformRequest.ts#L33-L108', 'transform.preview_transform.Response': 'transform/preview_transform/PreviewTransformResponse.ts#L22-L27', -'transform.put_transform.Request': 'transform/put_transform/PutTransformRequest.ts#L33-L122', +'transform.put_transform.Request': 'transform/put_transform/PutTransformRequest.ts#L33-L123', 'transform.put_transform.Response': 'transform/put_transform/PutTransformResponse.ts#L22-L24', -'transform.reset_transform.Request': 'transform/reset_transform/ResetTransformRequest.ts#L23-L48', +'transform.reset_transform.Request': 'transform/reset_transform/ResetTransformRequest.ts#L23-L49', 'transform.reset_transform.Response': 'transform/reset_transform/ResetTransformResponse.ts#L22-L24', -'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L49', +'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L50', 'transform.schedule_now_transform.Response': 'transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23', -'transform.start_transform.Request': 'transform/start_transform/StartTransformRequest.ts#L24-L65', +'transform.start_transform.Request': 'transform/start_transform/StartTransformRequest.ts#L24-L66', 'transform.start_transform.Response': 'transform/start_transform/StartTransformResponse.ts#L22-L24', -'transform.stop_transform.Request': 'transform/stop_transform/StopTransformRequest.ts#L24-L76', +'transform.stop_transform.Request': 'transform/stop_transform/StopTransformRequest.ts#L24-L77', 'transform.stop_transform.Response': 'transform/stop_transform/StopTransformResponse.ts#L22-L24', -'transform.update_transform.Request': 'transform/update_transform/UpdateTransformRequest.ts#L31-L105', +'transform.update_transform.Request': 'transform/update_transform/UpdateTransformRequest.ts#L31-L106', 'transform.update_transform.Response': 'transform/update_transform/UpdateTransformResponse.ts#L33-L51', 'watcher._types.ActionStatusOptions': 'watcher/_types/Action.ts#L102-L107' }; @@ -1646,10 +1767,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/90fe7e26253312b8efb4cad3fcb5c49e02bb325d/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/849b48056b38ca2fd576688e9604a7dad0e77c40/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java index c1b4e04ce..28832bdab 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/DeletePolicyRequest.java @@ -56,7 +56,8 @@ // typedef: enrich.delete_policy.Request /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java index 93027966e..c624e1a58 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java @@ -68,7 +68,8 @@ public ElasticsearchEnrichAsyncClient withTransportOptions(@Nullable TransportOp // ----- Endpoint: enrich.delete_policy /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see Documentation @@ -83,7 +84,8 @@ public CompletableFuture deletePolicy(DeletePolicyRequest } /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @param fn * a function that initializes a builder to create the @@ -134,7 +136,7 @@ public final CompletableFuture executePolicy( // ----- Endpoint: enrich.get_policy /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -149,7 +151,7 @@ public CompletableFuture getPolicy(GetPolicyRequest request) } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -165,7 +167,7 @@ public final CompletableFuture getPolicy( } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -180,7 +182,7 @@ public CompletableFuture getPolicy() { // ----- Endpoint: enrich.put_policy /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see Documentation @@ -195,7 +197,7 @@ public CompletableFuture putPolicy(PutPolicyRequest request) } /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -213,8 +215,8 @@ public final CompletableFuture putPolicy( // ----- Endpoint: enrich.stats /** - * Returns enrich coordinator statistics and information about enrich policies - * that are currently executing. + * Get enrich stats. Returns enrich coordinator statistics and information about + * enrich policies that are currently executing. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java index f0780f16a..3201966b0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java @@ -68,7 +68,8 @@ public ElasticsearchEnrichClient withTransportOptions(@Nullable TransportOptions // ----- Endpoint: enrich.delete_policy /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @see Documentation @@ -83,7 +84,8 @@ public DeletePolicyResponse deletePolicy(DeletePolicyRequest request) throws IOE } /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy. Deletes an existing enrich policy and its enrich + * index. * * @param fn * a function that initializes a builder to create the @@ -137,7 +139,7 @@ public final ExecutePolicyResponse executePolicy( // ----- Endpoint: enrich.get_policy /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see Documentation @@ -152,7 +154,7 @@ public GetPolicyResponse getPolicy(GetPolicyRequest request) throws IOException, } /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -168,7 +170,7 @@ public final GetPolicyResponse getPolicy(FunctionDocumentation @@ -183,7 +185,7 @@ public GetPolicyResponse getPolicy() throws IOException, ElasticsearchException // ----- Endpoint: enrich.put_policy /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see Documentation @@ -198,7 +200,7 @@ public PutPolicyResponse putPolicy(PutPolicyRequest request) throws IOException, } /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @param fn * a function that initializes a builder to create the @@ -216,8 +218,8 @@ public final PutPolicyResponse putPolicy(FunctionDocumentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java index 83e037115..4415912ef 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/EnrichStatsRequest.java @@ -50,8 +50,8 @@ // typedef: enrich.stats.Request /** - * Returns enrich coordinator statistics and information about enrich policies - * that are currently executing. + * Get enrich stats. Returns enrich coordinator statistics and information about + * enrich policies that are currently executing. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java index 11d5ce276..c7f0bc30a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/GetPolicyRequest.java @@ -58,7 +58,7 @@ // typedef: enrich.get_policy.Request /** - * Returns information about an enrich policy. + * Get an enrich policy. Returns information about an enrich policy. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java index 6f7d87a50..c7382272b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/enrich/PutPolicyRequest.java @@ -58,7 +58,7 @@ // typedef: enrich.put_policy.Request /** - * Creates an enrich policy. + * Create an enrich policy. Creates an enrich policy. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java index 888459972..f9c7e3bf4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java @@ -97,6 +97,8 @@ public class QueryRequest extends RequestBase implements JsonpSerializable { private final String query; + private final Map> tables; + // --------------------------------------------------------------------------------------------- private QueryRequest(Builder builder) { @@ -110,6 +112,7 @@ private QueryRequest(Builder builder) { this.params = ApiTypeHelper.unmodifiable(builder.params); this.profile = builder.profile; this.query = ApiTypeHelper.requireNonNull(builder.query, this, "query"); + this.tables = ApiTypeHelper.unmodifiable(builder.tables); } @@ -196,6 +199,11 @@ public final List params() { } /** + * If provided and true the response will include an extra + * profile object with information on how the query was executed. + * This information is for human debugging and its format can change at any time + * but it can give some insight into the performance of each part of the query. + *

* API name: {@code profile} */ @Nullable @@ -213,6 +221,16 @@ public final String query() { return this.query; } + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + */ + public final Map> tables() { + return this.tables; + } + /** * Serialize this object to JSON. */ @@ -257,6 +275,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("query"); generator.write(this.query); + if (ApiTypeHelper.isDefined(this.tables)) { + generator.writeKey("tables"); + generator.writeStartObject(); + for (Map.Entry> item0 : this.tables.entrySet()) { + generator.writeKey(item0.getKey()); + generator.writeStartObject(); + if (item0.getValue() != null) { + for (Map.Entry item1 : item0.getValue().entrySet()) { + generator.writeKey(item1.getKey()); + item1.getValue().serialize(generator, mapper); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + } + } // --------------------------------------------------------------------------------------------- @@ -292,6 +330,9 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private String query; + @Nullable + private Map> tables; + /** * By default, ES|QL returns results as rows. For example, FROM returns each * individual document as one row. For the JSON, YAML, CBOR and smile formats, @@ -487,6 +528,11 @@ public final Builder params(Functiontrue the response will include an extra + * profile object with information on how the query was executed. + * This information is for human debugging and its format can change at any time + * but it can give some insight into the performance of each part of the query. + *

* API name: {@code profile} */ public final Builder profile(@Nullable Boolean value) { @@ -505,6 +551,32 @@ public final Builder query(String value) { return this; } + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + *

+ * Adds all entries of map to tables. + */ + public final Builder tables(Map> map) { + this.tables = _mapPutAll(this.tables, map); + return this; + } + + /** + * Tables to use with the LOOKUP operation. The top level key is the table name + * and the next level key is the column name. + *

+ * API name: {@code tables} + *

+ * Adds an entry to tables. + */ + public final Builder tables(String key, Map value) { + this.tables = _mapPut(this.tables, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -539,6 +611,8 @@ protected static void setupQueryRequestDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class TableValues implements TaggedUnion, JsonpSerializable { + + /** + * {@link TableValues} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + Integer("integer"), + + Keyword("keyword"), + + Long("long"), + + Double("double"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + public TableValues(TableValuesVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._tableValuesKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private TableValues(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static TableValues of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code integer}? + */ + public boolean isInteger() { + return _kind == Kind.Integer; + } + + /** + * Get the {@code integer} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code integer} kind. + */ + public List> integer() { + return TaggedUnionUtils.get(this, Kind.Integer); + } + + /** + * Is this variant instance of kind {@code keyword}? + */ + public boolean isKeyword() { + return _kind == Kind.Keyword; + } + + /** + * Get the {@code keyword} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code keyword} kind. + */ + public List> keyword() { + return TaggedUnionUtils.get(this, Kind.Keyword); + } + + /** + * Is this variant instance of kind {@code long}? + */ + public boolean isLong() { + return _kind == Kind.Long; + } + + /** + * Get the {@code long} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code long} kind. + */ + public List> long_() { + return TaggedUnionUtils.get(this, Kind.Long); + } + + /** + * Is this variant instance of kind {@code double}? + */ + public boolean isDouble() { + return _kind == Kind.Double; + } + + /** + * Get the {@code double} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code double} kind. + */ + public List> double_() { + return TaggedUnionUtils.get(this, Kind.Double); + } + + @Override + @SuppressWarnings("unchecked") + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeStartObject(); + + generator.writeKey(_kind.jsonValue()); + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case Integer : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Integer item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Keyword : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (String item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Long : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Long item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + case Double : + generator.writeStartArray(); + for (List item0 : ((List>) this._value)) { + generator.writeStartArray(); + if (item0 != null) { + for (Double item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + + break; + } + } + + generator.writeEnd(); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder integer(List> v) { + this._kind = Kind.Integer; + this._value = v; + return this; + } + + public ObjectBuilder keyword(List> v) { + this._kind = Kind.Keyword; + this._value = v; + return this; + } + + public ObjectBuilder long_(List> v) { + this._kind = Kind.Long; + this._value = v; + return this; + } + + public ObjectBuilder double_(List> v) { + this._kind = Kind.Double; + this._value = v; + return this; + } + + public TableValues build() { + _checkSingleUse(); + return new TableValues(this); + } + + } + + protected static void setupTableValuesDeserializer(ObjectDeserializer op) { + + op.add(Builder::integer, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.integerDeserializer())), "integer"); + op.add(Builder::keyword, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), "keyword"); + op.add(Builder::long_, JsonpDeserializer + .arrayDeserializer(JsonpDeserializer.arrayDeserializer(JsonpDeserializer.longDeserializer())), "long"); + op.add(Builder::double_, JsonpDeserializer.arrayDeserializer( + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer())), "double"); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TableValues::setupTableValuesDeserializer, Builder::build); +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java new file mode 100644 index 000000000..54f740e44 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesBuilders.java @@ -0,0 +1,57 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.esql; + +import co.elastic.clients.util.ObjectBuilder; +import java.lang.Double; +import java.lang.Integer; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link TableValues} variants. + *

+ * Variants integer, keyword, long, + * double are not available here as they don't have a dedicated + * class. Use {@link TableValues}'s builder for these. + * + */ +public class TableValuesBuilders { + private TableValuesBuilders() { + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java new file mode 100644 index 000000000..7fc6bbd29 --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/esql/TableValuesVariant.java @@ -0,0 +1,48 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.esql; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Base interface for {@link TableValues} variants. + */ +public interface TableValuesVariant { + + TableValues.Kind _tableValuesKind(); + + default TableValues _toTableValues() { + return new TableValues(this); + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java index 0ed0fb241..575697586 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java @@ -61,7 +61,8 @@ // typedef: indices.add_block.Request /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java index 79ae44f41..a93f1bbe0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateDataStreamRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -31,7 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -56,8 +56,8 @@ // typedef: indices.create_data_stream.Request /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @see API @@ -65,13 +65,21 @@ */ public class CreateDataStreamRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + private final String name; + @Nullable + private final Time timeout; + // --------------------------------------------------------------------------------------------- private CreateDataStreamRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timeout = builder.timeout; } @@ -79,6 +87,17 @@ public static CreateDataStreamRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Name of the data stream, which must meet the following criteria: * Lowercase only; Cannot include \, /, @@ -95,6 +114,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + // --------------------------------------------------------------------------------------------- /** @@ -104,8 +134,35 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Name of the data stream, which must meet the following criteria: * Lowercase only; Cannot include \, /, @@ -123,6 +180,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -191,7 +269,14 @@ public CreateDataStreamRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, CreateDataStreamResponse._DESERIALIZER); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java index 8f227b173..1a9e5011e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/CreateIndexRequest.java @@ -60,7 +60,7 @@ // typedef: indices.create.Request /** - * Creates a new index. + * Create an index. Creates a new index. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java index 9515531df..caedfe618 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStream.java @@ -70,6 +70,9 @@ public class DataStream implements JsonpSerializable { @Nullable private final Boolean allowCustomRouting; + @Nullable + private final FailureStore failureStore; + private final int generation; private final boolean hidden; @@ -91,6 +94,8 @@ public class DataStream implements JsonpSerializable { @Nullable private final Boolean replicated; + private final boolean rolloverOnWrite; + private final HealthStatus status; @Nullable @@ -106,6 +111,7 @@ private DataStream(Builder builder) { this.meta = ApiTypeHelper.unmodifiable(builder.meta); this.allowCustomRouting = builder.allowCustomRouting; + this.failureStore = builder.failureStore; this.generation = ApiTypeHelper.requireNonNull(builder.generation, this, "generation"); this.hidden = ApiTypeHelper.requireNonNull(builder.hidden, this, "hidden"); this.ilmPolicy = builder.ilmPolicy; @@ -116,6 +122,7 @@ private DataStream(Builder builder) { this.lifecycle = builder.lifecycle; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.replicated = builder.replicated; + this.rolloverOnWrite = ApiTypeHelper.requireNonNull(builder.rolloverOnWrite, this, "rolloverOnWrite"); this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); this.system = builder.system; this.template = ApiTypeHelper.requireNonNull(builder.template, this, "template"); @@ -148,6 +155,16 @@ public final Boolean allowCustomRouting() { return this.allowCustomRouting; } + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + @Nullable + public final FailureStore failureStore() { + return this.failureStore; + } + /** * Required - Current generation for the data stream. This number acts as a * cumulative count of the stream’s rollovers, starting at 1. @@ -215,8 +232,7 @@ public final List indices() { } /** - * Contains the configuration for the data lifecycle management of this data - * stream. + * Contains the configuration for the data stream lifecycle of this data stream. *

* API name: {@code lifecycle} */ @@ -246,6 +262,17 @@ public final Boolean replicated() { return this.replicated; } + /** + * Required - If true, the next write to this data stream will + * trigger a rollover first and the document will be indexed in the new backing + * index. If the rollover fails the indexing request will fail too. + *

+ * API name: {@code rollover_on_write} + */ + public final boolean rolloverOnWrite() { + return this.rolloverOnWrite; + } + /** * Required - Health status of the data stream. This health status is based on * the state of the primary and replica shards of the stream’s backing indices. @@ -314,6 +341,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("allow_custom_routing"); generator.write(this.allowCustomRouting); + } + if (this.failureStore != null) { + generator.writeKey("failure_store"); + this.failureStore.serialize(generator, mapper); + } generator.writeKey("generation"); generator.write(this.generation); @@ -354,6 +386,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.replicated); } + generator.writeKey("rollover_on_write"); + generator.write(this.rolloverOnWrite); + generator.writeKey("status"); this.status.serialize(generator, mapper); if (this.system != null) { @@ -387,6 +422,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean allowCustomRouting; + @Nullable + private FailureStore failureStore; + private Integer generation; private Boolean hidden; @@ -408,6 +446,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean replicated; + private Boolean rolloverOnWrite; + private HealthStatus status; @Nullable @@ -455,6 +495,25 @@ public final Builder allowCustomRouting(@Nullable Boolean value) { return this; } + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + public final Builder failureStore(@Nullable FailureStore value) { + this.failureStore = value; + return this; + } + + /** + * Information about failure store backing indices + *

+ * API name: {@code failure_store} + */ + public final Builder failureStore(Function> fn) { + return this.failureStore(fn.apply(new FailureStore.Builder()).build()); + } + /** * Required - Current generation for the data stream. This number acts as a * cumulative count of the stream’s rollovers, starting at 1. @@ -556,8 +615,7 @@ public final Builder indices(Function * API name: {@code lifecycle} */ @@ -567,8 +625,7 @@ public final Builder lifecycle(@Nullable DataStreamLifecycleWithRollover value) } /** - * Contains the configuration for the data lifecycle management of this data - * stream. + * Contains the configuration for the data stream lifecycle of this data stream. *

* API name: {@code lifecycle} */ @@ -599,6 +656,18 @@ public final Builder replicated(@Nullable Boolean value) { return this; } + /** + * Required - If true, the next write to this data stream will + * trigger a rollover first and the document will be indexed in the new backing + * index. If the rollover fails the indexing request will fail too. + *

+ * API name: {@code rollover_on_write} + */ + public final Builder rolloverOnWrite(boolean value) { + this.rolloverOnWrite = value; + return this; + } + /** * Required - Health status of the data stream. This health status is based on * the state of the primary and replica shards of the stream’s backing indices. @@ -685,6 +754,7 @@ protected static void setupDataStreamDeserializer(ObjectDeserializer * API name: {@code managed_by} */ + @Nullable public final ManagedBy managedBy() { return this.managedBy; } /** - * Required - Indicates if ILM should take precedence over DSL in case both are - * configured to manage this index. + * Indicates if ILM should take precedence over DSL in case both are configured + * to manage this index. *

* API name: {@code prefer_ilm} */ - public final boolean preferIlm() { + @Nullable + public final Boolean preferIlm() { return this.preferIlm; } @@ -157,10 +160,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.ilmPolicy); } - generator.writeKey("managed_by"); - this.managedBy.serialize(generator, mapper); - generator.writeKey("prefer_ilm"); - generator.write(this.preferIlm); + if (this.managedBy != null) { + generator.writeKey("managed_by"); + this.managedBy.serialize(generator, mapper); + } + if (this.preferIlm != null) { + generator.writeKey("prefer_ilm"); + generator.write(this.preferIlm); + + } } @@ -183,8 +191,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private String ilmPolicy; + @Nullable private ManagedBy managedBy; + @Nullable private Boolean preferIlm; /** @@ -218,23 +228,22 @@ public final Builder ilmPolicy(@Nullable String value) { } /** - * Required - Name of the lifecycle system that's currently managing this - * backing index. + * Name of the lifecycle system that's currently managing this backing index. *

* API name: {@code managed_by} */ - public final Builder managedBy(ManagedBy value) { + public final Builder managedBy(@Nullable ManagedBy value) { this.managedBy = value; return this; } /** - * Required - Indicates if ILM should take precedence over DSL in case both are - * configured to manage this index. + * Indicates if ILM should take precedence over DSL in case both are configured + * to manage this index. *

* API name: {@code prefer_ilm} */ - public final Builder preferIlm(boolean value) { + public final Builder preferIlm(@Nullable Boolean value) { this.preferIlm = value; return this; } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java index d3d6f4040..7d8973e75 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java @@ -52,8 +52,8 @@ // typedef: indices._types.DataStreamLifecycle /** - * Data lifecycle denotes that a data stream is managed by the data stream - * lifecycle and contains the configuration. + * Data stream lifecycle denotes that a data stream is managed by the data + * stream lifecycle and contains the configuration. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java index d1eb39b7f..14e94e6e1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycleWithRollover.java @@ -52,7 +52,7 @@ // typedef: indices._types.DataStreamLifecycleWithRollover /** - * Data lifecycle with rollover can be used to display the configuration + * Data stream lifecycle with rollover can be used to display the configuration * including the default rollover conditions, if asked. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java index 379766b9e..711ef9bb2 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteAliasRequest.java @@ -58,7 +58,7 @@ // typedef: indices.delete_alias.Request /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java index 8da922024..806db4c28 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataLifecycleRequest.java @@ -59,8 +59,8 @@ // typedef: indices.delete_data_lifecycle.Request /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java index a8cb9e4f4..4b048ef15 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteDataStreamRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -58,7 +59,8 @@ // typedef: indices.delete_data_stream.Request /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see API @@ -68,6 +70,9 @@ public class DeleteDataStreamRequest extends RequestBase { private final List expandWildcards; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -75,6 +80,7 @@ public class DeleteDataStreamRequest extends RequestBase { private DeleteDataStreamRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -93,6 +99,17 @@ public final List expandWildcards() { return this.expandWildcards; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Comma-separated list of data streams to delete. Wildcard * (*) expressions are supported. @@ -115,6 +132,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private List expandWildcards; + @Nullable + private Time masterTimeout; + private List name; /** @@ -143,6 +163,27 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Comma-separated list of data streams to delete. Wildcard * (*) expressions are supported. @@ -238,6 +279,9 @@ public DeleteDataStreamRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java index a82af788c..65b550b03 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java @@ -60,7 +60,7 @@ // typedef: indices.delete.Request /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index e9c68d0cf..fe5ed34cb 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -71,7 +71,8 @@ public ElasticsearchIndicesAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: indices.add_block /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see Documentation @@ -86,7 +87,8 @@ public CompletableFuture addBlock(AddBlockRequest request) { } /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @param fn * a function that initializes a builder to create the @@ -150,7 +152,7 @@ public CompletableFuture analyze() { // ----- Endpoint: indices.create /** - * Creates a new index. + * Create an index. Creates a new index. * * @see Documentation @@ -165,7 +167,7 @@ public CompletableFuture create(CreateIndexRequest request) } /** - * Creates a new index. + * Create an index. Creates a new index. * * @param fn * a function that initializes a builder to create the @@ -183,8 +185,8 @@ public final CompletableFuture create( // ----- Endpoint: indices.create_data_stream /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @see Documentation @@ -199,8 +201,8 @@ public CompletableFuture createDataStream(CreateDataSt } /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @param fn * a function that initializes a builder to create the @@ -218,7 +220,7 @@ public final CompletableFuture createDataStream( // ----- Endpoint: indices.data_streams_stats /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -233,7 +235,7 @@ public CompletableFuture dataStreamsStats(DataStreamsS } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -249,7 +251,7 @@ public final CompletableFuture dataStreamsStats( } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -264,7 +266,7 @@ public CompletableFuture dataStreamsStats() { // ----- Endpoint: indices.delete /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see Documentation @@ -279,7 +281,7 @@ public CompletableFuture delete(DeleteIndexRequest request) } /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @param fn * a function that initializes a builder to create the @@ -297,7 +299,7 @@ public final CompletableFuture delete( // ----- Endpoint: indices.delete_alias /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @see Documentation @@ -312,7 +314,7 @@ public CompletableFuture deleteAlias(DeleteAliasRequest req } /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @param fn * a function that initializes a builder to create the @@ -330,8 +332,8 @@ public final CompletableFuture deleteAlias( // ----- Endpoint: indices.delete_data_lifecycle /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see Documentation @@ -346,8 +348,8 @@ public CompletableFuture deleteDataLifecycle(Delete } /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @param fn * a function that initializes a builder to create the @@ -365,7 +367,8 @@ public final CompletableFuture deleteDataLifecycle( // ----- Endpoint: indices.delete_data_stream /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see Documentation @@ -380,7 +383,8 @@ public CompletableFuture deleteDataStream(DeleteDataSt } /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @param fn * a function that initializes a builder to create the @@ -437,7 +441,8 @@ public final CompletableFuture deleteIndexTemplate( // ----- Endpoint: indices.exists /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see Documentation @@ -452,7 +457,8 @@ public CompletableFuture exists(ExistsRequest request) { } /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @param fn * a function that initializes a builder to create the @@ -470,7 +476,7 @@ public final CompletableFuture exists( // ----- Endpoint: indices.exists_alias /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @see Documentation @@ -485,7 +491,7 @@ public CompletableFuture existsAlias(ExistsAliasRequest request } /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @param fn * a function that initializes a builder to create the @@ -536,8 +542,10 @@ public final CompletableFuture existsIndexTemplate( // ----- Endpoint: indices.explain_data_lifecycle /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see Documentation @@ -552,8 +560,10 @@ public CompletableFuture explainDataLifecycle(Expl } /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @param fn * a function that initializes a builder to create the @@ -571,8 +581,8 @@ public final CompletableFuture explainDataLifecycl // ----- Endpoint: indices.get /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see Documentation @@ -587,8 +597,8 @@ public CompletableFuture get(GetIndexRequest request) { } /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -606,7 +616,8 @@ public final CompletableFuture get( // ----- Endpoint: indices.get_alias /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see Documentation @@ -621,7 +632,8 @@ public CompletableFuture getAlias(GetAliasRequest request) { } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @param fn * a function that initializes a builder to create the @@ -637,7 +649,8 @@ public final CompletableFuture getAlias( } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see Documentation @@ -652,8 +665,8 @@ public CompletableFuture getAlias() { // ----- Endpoint: indices.get_data_lifecycle /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see Documentation @@ -668,8 +681,8 @@ public CompletableFuture getDataLifecycle(GetDataLifec } /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -687,7 +700,7 @@ public final CompletableFuture getDataLifecycle( // ----- Endpoint: indices.get_data_stream /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -702,7 +715,7 @@ public CompletableFuture getDataStream(GetDataStreamReque } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -718,7 +731,7 @@ public final CompletableFuture getDataStream( } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -779,8 +792,9 @@ public CompletableFuture getIndexTemplate() { // ----- Endpoint: indices.get_mapping /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -795,8 +809,9 @@ public CompletableFuture getMapping(GetMappingRequest reques } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @param fn * a function that initializes a builder to create the @@ -812,8 +827,9 @@ public final CompletableFuture getMapping( } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -828,8 +844,8 @@ public CompletableFuture getMapping() { // ----- Endpoint: indices.get_settings /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -844,8 +860,8 @@ public CompletableFuture getSettings(GetIndicesSetti } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -861,8 +877,8 @@ public final CompletableFuture getSettings( } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -877,15 +893,15 @@ public CompletableFuture getSettings() { // ----- Endpoint: indices.migrate_to_data_stream /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see Documentation @@ -900,15 +916,15 @@ public CompletableFuture migrateToDataStream(Migrat } /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @param fn * a function that initializes a builder to create the @@ -926,8 +942,8 @@ public final CompletableFuture migrateToDataStream( // ----- Endpoint: indices.modify_data_stream /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see Documentation @@ -942,8 +958,8 @@ public CompletableFuture modifyDataStream(ModifyDataSt } /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @param fn * a function that initializes a builder to create the @@ -961,7 +977,7 @@ public final CompletableFuture modifyDataStream( // ----- Endpoint: indices.put_alias /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -976,7 +992,7 @@ public CompletableFuture putAlias(PutAliasRequest request) { } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -994,7 +1010,8 @@ public final CompletableFuture putAlias( // ----- Endpoint: indices.put_data_lifecycle /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @see Documentation @@ -1009,7 +1026,8 @@ public CompletableFuture putDataLifecycle(PutDataLifec } /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @param fn * a function that initializes a builder to create the @@ -1062,9 +1080,10 @@ public final CompletableFuture putIndexTemplate( // ----- Endpoint: indices.put_mapping /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see Documentation @@ -1079,9 +1098,10 @@ public CompletableFuture putMapping(PutMappingRequest reques } /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @param fn * a function that initializes a builder to create the @@ -1099,8 +1119,8 @@ public final CompletableFuture putMapping( // ----- Endpoint: indices.put_settings /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1115,8 +1135,8 @@ public CompletableFuture putSettings(PutIndicesSetti } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @param fn * a function that initializes a builder to create the @@ -1132,8 +1152,8 @@ public final CompletableFuture putSettings( } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1183,9 +1203,9 @@ public final CompletableFuture putTemplate( // ----- Endpoint: indices.refresh /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1200,9 +1220,9 @@ public CompletableFuture refresh(RefreshRequest request) { } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -1218,9 +1238,9 @@ public final CompletableFuture refresh( } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1270,7 +1290,8 @@ public final CompletableFuture resolveIndex( // ----- Endpoint: indices.rollover /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see Documentation @@ -1285,7 +1306,8 @@ public CompletableFuture rollover(RolloverRequest request) { } /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @param fn * a function that initializes a builder to create the @@ -1388,7 +1410,7 @@ public CompletableFuture simulateTemplate() { // ----- Endpoint: indices.update_aliases /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1403,7 +1425,7 @@ public CompletableFuture updateAliases(UpdateAliasesReque } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1419,7 +1441,7 @@ public final CompletableFuture updateAliases( } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1434,7 +1456,7 @@ public CompletableFuture updateAliases() { // ----- Endpoint: indices.validate_query /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation @@ -1449,7 +1471,7 @@ public CompletableFuture validateQuery(ValidateQueryReque } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @param fn * a function that initializes a builder to create the @@ -1465,7 +1487,7 @@ public final CompletableFuture validateQuery( } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index bc75ef401..f9c544a6a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -69,7 +69,8 @@ public ElasticsearchIndicesClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: indices.add_block /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @see Documentation @@ -84,7 +85,8 @@ public AddBlockResponse addBlock(AddBlockRequest request) throws IOException, El } /** - * Adds a block to an index. + * Add an index block. Limits the operations allowed on an index by blocking + * specific operation types. * * @param fn * a function that initializes a builder to create the @@ -148,7 +150,7 @@ public AnalyzeResponse analyze() throws IOException, ElasticsearchException { // ----- Endpoint: indices.create /** - * Creates a new index. + * Create an index. Creates a new index. * * @see Documentation @@ -163,7 +165,7 @@ public CreateIndexResponse create(CreateIndexRequest request) throws IOException } /** - * Creates a new index. + * Create an index. Creates a new index. * * @param fn * a function that initializes a builder to create the @@ -181,8 +183,8 @@ public final CreateIndexResponse create(FunctionDocumentation @@ -198,8 +200,8 @@ public CreateDataStreamResponse createDataStream(CreateDataStreamRequest request } /** - * Creates a data stream. You must have a matching index template with data - * stream enabled. + * Create a data stream. Creates a data stream. You must have a matching index + * template with data stream enabled. * * @param fn * a function that initializes a builder to create the @@ -218,7 +220,7 @@ public final CreateDataStreamResponse createDataStream( // ----- Endpoint: indices.data_streams_stats /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -234,7 +236,7 @@ public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -251,7 +253,7 @@ public final DataStreamsStatsResponse dataStreamsStats( } /** - * Retrieves statistics for one or more data streams. + * Get data stream stats. Retrieves statistics for one or more data streams. * * @see Documentation @@ -266,7 +268,7 @@ public DataStreamsStatsResponse dataStreamsStats() throws IOException, Elasticse // ----- Endpoint: indices.delete /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @see Documentation @@ -281,7 +283,7 @@ public DeleteIndexResponse delete(DeleteIndexRequest request) throws IOException } /** - * Deletes one or more indices. + * Delete indices. Deletes one or more indices. * * @param fn * a function that initializes a builder to create the @@ -299,7 +301,7 @@ public final DeleteIndexResponse delete(FunctionDocumentation @@ -314,7 +316,7 @@ public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws IOExce } /** - * Removes a data stream or index from an alias. + * Delete an alias. Removes a data stream or index from an alias. * * @param fn * a function that initializes a builder to create the @@ -333,8 +335,8 @@ public final DeleteAliasResponse deleteAlias( // ----- Endpoint: indices.delete_data_lifecycle /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @see Documentation @@ -350,8 +352,8 @@ public DeleteDataLifecycleResponse deleteDataLifecycle(DeleteDataLifecycleReques } /** - * Removes the data lifecycle from a data stream rendering it not managed by the - * data stream lifecycle + * Delete data stream lifecycles. Removes the data stream lifecycle from a data + * stream, rendering it not managed by the data stream lifecycle. * * @param fn * a function that initializes a builder to create the @@ -370,7 +372,8 @@ public final DeleteDataLifecycleResponse deleteDataLifecycle( // ----- Endpoint: indices.delete_data_stream /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @see Documentation @@ -386,7 +389,8 @@ public DeleteDataStreamResponse deleteDataStream(DeleteDataStreamRequest request } /** - * Deletes one or more data streams and their backing indices. + * Delete data streams. Deletes one or more data streams and their backing + * indices. * * @param fn * a function that initializes a builder to create the @@ -446,7 +450,8 @@ public final DeleteIndexTemplateResponse deleteIndexTemplate( // ----- Endpoint: indices.exists /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see Documentation @@ -461,7 +466,8 @@ public BooleanResponse exists(ExistsRequest request) throws IOException, Elastic } /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @param fn * a function that initializes a builder to create the @@ -479,7 +485,7 @@ public final BooleanResponse exists(FunctionDocumentation @@ -494,7 +500,7 @@ public BooleanResponse existsAlias(ExistsAliasRequest request) throws IOExceptio } /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @param fn * a function that initializes a builder to create the @@ -547,8 +553,10 @@ public final BooleanResponse existsIndexTemplate( // ----- Endpoint: indices.explain_data_lifecycle /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see Documentation @@ -564,8 +572,10 @@ public ExplainDataLifecycleResponse explainDataLifecycle(ExplainDataLifecycleReq } /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @param fn * a function that initializes a builder to create the @@ -584,8 +594,8 @@ public final ExplainDataLifecycleResponse explainDataLifecycle( // ----- Endpoint: indices.get /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see Documentation @@ -600,8 +610,8 @@ public GetIndexResponse get(GetIndexRequest request) throws IOException, Elastic } /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -619,7 +629,8 @@ public final GetIndexResponse get(FunctionDocumentation @@ -634,7 +645,8 @@ public GetAliasResponse getAlias(GetAliasRequest request) throws IOException, El } /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @param fn * a function that initializes a builder to create the @@ -650,7 +662,8 @@ public final GetAliasResponse getAlias(FunctionDocumentation @@ -665,8 +678,8 @@ public GetAliasResponse getAlias() throws IOException, ElasticsearchException { // ----- Endpoint: indices.get_data_lifecycle /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see Documentation @@ -682,8 +695,8 @@ public GetDataLifecycleResponse getDataLifecycle(GetDataLifecycleRequest request } /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -702,7 +715,7 @@ public final GetDataLifecycleResponse getDataLifecycle( // ----- Endpoint: indices.get_data_stream /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -718,7 +731,7 @@ public GetDataStreamResponse getDataStream(GetDataStreamRequest request) } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @param fn * a function that initializes a builder to create the @@ -735,7 +748,7 @@ public final GetDataStreamResponse getDataStream( } /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see Documentation @@ -798,8 +811,9 @@ public GetIndexTemplateResponse getIndexTemplate() throws IOException, Elasticse // ----- Endpoint: indices.get_mapping /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see Documentation @@ -814,8 +828,9 @@ public GetMappingResponse getMapping(GetMappingRequest request) throws IOExcepti } /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @param fn * a function that initializes a builder to create the @@ -831,8 +846,9 @@ public final GetMappingResponse getMapping(FunctionDocumentation @@ -847,8 +863,8 @@ public GetMappingResponse getMapping() throws IOException, ElasticsearchExceptio // ----- Endpoint: indices.get_settings /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -864,8 +880,8 @@ public GetIndicesSettingsResponse getSettings(GetIndicesSettingsRequest request) } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -882,8 +898,8 @@ public final GetIndicesSettingsResponse getSettings( } /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see Documentation @@ -898,15 +914,15 @@ public GetIndicesSettingsResponse getSettings() throws IOException, Elasticsearc // ----- Endpoint: indices.migrate_to_data_stream /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see Documentation @@ -922,15 +938,15 @@ public MigrateToDataStreamResponse migrateToDataStream(MigrateToDataStreamReques } /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @param fn * a function that initializes a builder to create the @@ -949,8 +965,8 @@ public final MigrateToDataStreamResponse migrateToDataStream( // ----- Endpoint: indices.modify_data_stream /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see Documentation @@ -966,8 +982,8 @@ public ModifyDataStreamResponse modifyDataStream(ModifyDataStreamRequest request } /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @param fn * a function that initializes a builder to create the @@ -986,7 +1002,7 @@ public final ModifyDataStreamResponse modifyDataStream( // ----- Endpoint: indices.put_alias /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1001,7 +1017,7 @@ public PutAliasResponse putAlias(PutAliasRequest request) throws IOException, El } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1019,7 +1035,8 @@ public final PutAliasResponse putAlias(FunctionDocumentation @@ -1035,7 +1052,8 @@ public PutDataLifecycleResponse putDataLifecycle(PutDataLifecycleRequest request } /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @param fn * a function that initializes a builder to create the @@ -1091,9 +1109,10 @@ public final PutIndexTemplateResponse putIndexTemplate( // ----- Endpoint: indices.put_mapping /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see Documentation @@ -1108,9 +1127,10 @@ public PutMappingResponse putMapping(PutMappingRequest request) throws IOExcepti } /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @param fn * a function that initializes a builder to create the @@ -1128,8 +1148,8 @@ public final PutMappingResponse putMapping(FunctionDocumentation @@ -1145,8 +1165,8 @@ public PutIndicesSettingsResponse putSettings(PutIndicesSettingsRequest request) } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @param fn * a function that initializes a builder to create the @@ -1163,8 +1183,8 @@ public final PutIndicesSettingsResponse putSettings( } /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see Documentation @@ -1215,9 +1235,9 @@ public final PutTemplateResponse putTemplate( // ----- Endpoint: indices.refresh /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see Documentation @@ -1232,9 +1252,9 @@ public RefreshResponse refresh(RefreshRequest request) throws IOException, Elast } /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @param fn * a function that initializes a builder to create the @@ -1250,9 +1270,9 @@ public final RefreshResponse refresh(FunctionDocumentation @@ -1303,7 +1323,8 @@ public final ResolveIndexResponse resolveIndex( // ----- Endpoint: indices.rollover /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see Documentation @@ -1318,7 +1339,8 @@ public RolloverResponse rollover(RolloverRequest request) throws IOException, El } /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @param fn * a function that initializes a builder to create the @@ -1424,7 +1446,7 @@ public SimulateTemplateResponse simulateTemplate() throws IOException, Elasticse // ----- Endpoint: indices.update_aliases /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1440,7 +1462,7 @@ public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request) } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @param fn * a function that initializes a builder to create the @@ -1457,7 +1479,7 @@ public final UpdateAliasesResponse updateAliases( } /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see Documentation @@ -1472,7 +1494,7 @@ public UpdateAliasesResponse updateAliases() throws IOException, ElasticsearchEx // ----- Endpoint: indices.validate_query /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation @@ -1488,7 +1510,7 @@ public ValidateQueryResponse validateQuery(ValidateQueryRequest request) } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @param fn * a function that initializes a builder to create the @@ -1505,7 +1527,7 @@ public final ValidateQueryResponse validateQuery( } /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java index 63a5accac..b86cd677b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java @@ -61,7 +61,7 @@ // typedef: indices.exists_alias.Request /** - * Checks if an alias exists. + * Check aliases. Checks if one or more data stream or index aliases exist. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java index 351959e8c..1e11e63ea 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java @@ -61,7 +61,8 @@ // typedef: indices.exists.Request /** - * Checks if a data stream, index, or alias exists. + * Check indices. Checks if one or more indices, index aliases, or data streams + * exist. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java index 0de719315..1af1f6e3d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ExplainDataLifecycleRequest.java @@ -59,8 +59,10 @@ // typedef: indices.explain_data_lifecycle.Request /** - * Retrieves information about the index's current data stream lifecycle, such - * as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle. Retrieves information about an + * index or data stream’s current data stream lifecycle status, such as time + * since index creation, time since rollover, the lifecycle configuration + * managing the index, or any errors encountered during lifecycle execution. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java new file mode 100644 index 000000000..c43ae6b1c --- /dev/null +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/FailureStore.java @@ -0,0 +1,230 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.indices; + +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.JsonpUtils; +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.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: indices._types.FailureStore + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FailureStore implements JsonpSerializable { + private final boolean enabled; + + private final List indices; + + private final boolean rolloverOnWrite; + + // --------------------------------------------------------------------------------------------- + + private FailureStore(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled"); + this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); + this.rolloverOnWrite = ApiTypeHelper.requireNonNull(builder.rolloverOnWrite, this, "rolloverOnWrite"); + + } + + public static FailureStore of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * Required - API name: {@code indices} + */ + public final List indices() { + return this.indices; + } + + /** + * Required - API name: {@code rollover_on_write} + */ + public final boolean rolloverOnWrite() { + return this.rolloverOnWrite; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("enabled"); + generator.write(this.enabled); + + if (ApiTypeHelper.isDefined(this.indices)) { + generator.writeKey("indices"); + generator.writeStartArray(); + for (DataStreamIndex item0 : this.indices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("rollover_on_write"); + generator.write(this.rolloverOnWrite); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FailureStore}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Boolean enabled; + + private List indices; + + private Boolean rolloverOnWrite; + + /** + * Required - API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds all elements of list to indices. + */ + public final Builder indices(List list) { + this.indices = _listAddAll(this.indices, list); + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds one or more values to indices. + */ + public final Builder indices(DataStreamIndex value, DataStreamIndex... values) { + this.indices = _listAdd(this.indices, value, values); + return this; + } + + /** + * Required - API name: {@code indices} + *

+ * Adds a value to indices using a builder lambda. + */ + public final Builder indices(Function> fn) { + return indices(fn.apply(new DataStreamIndex.Builder()).build()); + } + + /** + * Required - API name: {@code rollover_on_write} + */ + public final Builder rolloverOnWrite(boolean value) { + this.rolloverOnWrite = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FailureStore}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FailureStore build() { + _checkSingleUse(); + + return new FailureStore(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FailureStore} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + FailureStore::setupFailureStoreDeserializer); + + protected static void setupFailureStoreDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(DataStreamIndex._DESERIALIZER), "indices"); + op.add(Builder::rolloverOnWrite, JsonpDeserializer.booleanDeserializer(), "rollover_on_write"); + + } + +} diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java index 6a93c4c30..1c2195539 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java @@ -59,7 +59,8 @@ // typedef: indices.get_alias.Request /** - * Retrieves information for one or more aliases. + * Get aliases. Retrieves information for one or more data stream or index + * aliases. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java index 1c05dd329..7ae7c3df5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -59,8 +60,8 @@ // typedef: indices.get_data_lifecycle.Request /** - * Retrieves the data stream lifecycle configuration of one or more data - * streams. + * Get data stream lifecycles. Retrieves the data stream lifecycle configuration + * of one or more data streams. * * @see API @@ -73,6 +74,9 @@ public class GetDataLifecycleRequest extends RequestBase { @Nullable private final Boolean includeDefaults; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -81,6 +85,7 @@ private GetDataLifecycleRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.includeDefaults = builder.includeDefaults; + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -111,6 +116,17 @@ public final Boolean includeDefaults() { return this.includeDefaults; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Comma-separated list of data streams to limit the request. * Supports wildcards (*). To target all data streams, omit this @@ -137,6 +153,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Boolean includeDefaults; + @Nullable + private Time masterTimeout; + private List name; /** @@ -179,6 +198,27 @@ public final Builder includeDefaults(@Nullable Boolean value) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Comma-separated list of data streams to limit the request. * Supports wildcards (*). To target all data streams, omit this @@ -277,6 +317,9 @@ public GetDataLifecycleRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java index ebf90196a..e2a86b8ea 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataStreamRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -59,7 +60,7 @@ // typedef: indices.get_data_stream.Request /** - * Retrieves information about one or more data streams. + * Get data streams. Retrieves information about one or more data streams. * * @see API * specification @@ -71,6 +72,9 @@ public class GetDataStreamRequest extends RequestBase { @Nullable private final Boolean includeDefaults; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -79,6 +83,7 @@ private GetDataStreamRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.includeDefaults = builder.includeDefaults; + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiable(builder.name); } @@ -107,6 +112,17 @@ public final Boolean includeDefaults() { return this.includeDefaults; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Comma-separated list of data stream names used to limit the request. Wildcard * (*) expressions are supported. If omitted, all data streams are @@ -133,6 +149,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Boolean includeDefaults; + @Nullable + private Time masterTimeout; + @Nullable private List name; @@ -172,6 +191,27 @@ public final Builder includeDefaults(@Nullable Boolean value) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Comma-separated list of data stream names used to limit the request. Wildcard * (*) expressions are supported. If omitted, all data streams are @@ -278,6 +318,9 @@ public GetDataStreamRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java index 8cafaeecb..f25673cc9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java @@ -61,8 +61,8 @@ // typedef: indices.get.Request /** - * Returns information about one or more indices. For data streams, the API - * returns information about the stream’s backing indices. + * Get index information. Returns information about one or more indices. For + * data streams, the API returns information about the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java index 3272fe22a..b24881456 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java @@ -60,8 +60,8 @@ // typedef: indices.get_settings.Request /** - * Returns setting information for one or more indices. For data streams, - * returns setting information for the stream’s backing indices. + * Get index settings. Returns setting information for one or more indices. For + * data streams, returns setting information for the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java index 26f6866f8..ea3bf519a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java @@ -60,8 +60,9 @@ // typedef: indices.get_mapping.Request /** - * Retrieves mapping definitions for one or more indices. For data streams, the - * API retrieves mappings for the stream’s backing indices. + * Get mapping definitions. Retrieves mapping definitions for one or more + * indices. For data streams, the API retrieves mappings for the stream’s + * backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java index 360b03380..b787c554a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/IndexState.java @@ -138,7 +138,7 @@ public final String dataStream() { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ @@ -316,7 +316,7 @@ public final Builder dataStream(@Nullable String value) { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ @@ -326,7 +326,7 @@ public final Builder lifecycle(@Nullable DataStreamLifecycle value) { } /** - * Data lifecycle applicable if this is a data stream. + * Data stream lifecycle applicable if this is a data stream. *

* API name: {@code lifecycle} */ diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java index 989103136..6ad2f1b32 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/MigrateToDataStreamRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -31,7 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -56,15 +56,15 @@ // typedef: indices.migrate_to_data_stream.Request /** - * Converts an index alias to a data stream. You must have a matching index - * template that is data stream enabled. The alias must meet the following - * criteria: The alias must have a write index; All indices for the alias must - * have a @timestamp field mapping of a date or - * date_nanos field type; The alias must not have any filters; The - * alias must not use custom routing. If successful, the request removes the - * alias and creates a data stream with the same name. The indices for the alias - * become hidden backing indices for the stream. The write index for the alias - * becomes the write index for the stream. + * Convert an index alias to a data stream. Converts an index alias to a data + * stream. You must have a matching index template that is data stream enabled. + * The alias must meet the following criteria: The alias must have a write + * index; All indices for the alias must have a @timestamp field + * mapping of a date or date_nanos field type; The + * alias must not have any filters; The alias must not use custom routing. If + * successful, the request removes the alias and creates a data stream with the + * same name. The indices for the alias become hidden backing indices for the + * stream. The write index for the alias becomes the write index for the stream. * * @see API @@ -72,13 +72,21 @@ */ public class MigrateToDataStreamRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + private final String name; + @Nullable + private final Time timeout; + // --------------------------------------------------------------------------------------------- private MigrateToDataStreamRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timeout = builder.timeout; } @@ -86,6 +94,17 @@ public static MigrateToDataStreamRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Name of the index alias to convert to a data stream. *

@@ -95,6 +114,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + // --------------------------------------------------------------------------------------------- /** @@ -104,8 +134,35 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Name of the index alias to convert to a data stream. *

@@ -116,6 +173,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -185,7 +263,14 @@ public MigrateToDataStreamRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, MigrateToDataStreamResponse._DESERIALIZER); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java index 211ff2c86..92b887ae5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ModifyDataStreamRequest.java @@ -57,8 +57,8 @@ // typedef: indices.modify_data_stream.Request /** - * Performs one or more data stream modification actions in a single atomic - * operation. + * Update data streams. Performs one or more data stream modification actions in + * a single atomic operation. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java index d278fed41..75f743d04 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutAliasRequest.java @@ -62,7 +62,7 @@ // typedef: indices.put_alias.Request /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java index cb2b6c1d1..00ad95dc1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutDataLifecycleRequest.java @@ -61,7 +61,8 @@ // typedef: indices.put_data_lifecycle.Request /** - * Update the data lifecycle of the specified data streams. + * Update data stream lifecycles. Update the data stream lifecycle of the + * specified data streams. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java index aaecb4b99..860a3a0ff 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java @@ -63,8 +63,8 @@ // typedef: indices.put_settings.Request /** - * Changes a dynamic index setting in real time. For data streams, index setting - * changes are applied to all backing indices by default. + * Update index settings. Changes dynamic index settings in real time. For data + * streams, index setting changes are applied to all backing indices by default. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java index b9e0415d5..f818dc02d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java @@ -70,9 +70,10 @@ // typedef: indices.put_mapping.Request /** - * Adds new fields to an existing data stream or index. You can also use this - * API to change the search settings of existing fields. For data streams, these - * changes are applied to all backing indices by default. + * Update field mappings. Adds new fields to an existing data stream or index. + * You can also use this API to change the search settings of existing fields. + * For data streams, these changes are applied to all backing indices by + * default. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java index 9fa83be14..218b5a1c4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java @@ -59,9 +59,9 @@ // typedef: indices.refresh.Request /** - * A refresh makes recent operations performed on one or more indices available - * for search. For data streams, the API runs the refresh operation on the - * stream’s backing indices. + * Refresh an index. A refresh makes recent operations performed on one or more + * indices available for search. For data streams, the API runs the refresh + * operation on the stream’s backing indices. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java index 8d0c14bdc..6c6fb15d4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/RolloverRequest.java @@ -63,7 +63,8 @@ // typedef: indices.rollover.Request /** - * Creates a new index for a data stream or index alias. + * Roll over to a new index. Creates a new index for a data stream or index + * alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java index 4ec3536d5..8c5b888d7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/UpdateAliasesRequest.java @@ -60,7 +60,7 @@ // typedef: indices.update_aliases.Request /** - * Adds a data stream or index to an alias. + * Create or update an alias. Adds a data stream or index to an alias. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java index f6e932181..0d2ae4412 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java @@ -63,7 +63,7 @@ // typedef: indices.validate_query.Request /** - * Validates a potentially expensive query without executing it. + * Validate a query. Validates a query without running it. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java index a81e9b927..b9aad69f7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseAsyncClient.java @@ -70,10 +70,11 @@ public ElasticsearchLicenseAsyncClient withTransportOptions(@Nullable TransportO // ----- Endpoint: license.get /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation @@ -88,10 +89,11 @@ public CompletableFuture get(GetLicenseRequest request) { } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @param fn * a function that initializes a builder to create the @@ -107,10 +109,11 @@ public final CompletableFuture get( } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java index 8accbf228..ed623eab1 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/ElasticsearchLicenseClient.java @@ -68,10 +68,11 @@ public ElasticsearchLicenseClient withTransportOptions(@Nullable TransportOption // ----- Endpoint: license.get /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation @@ -86,10 +87,11 @@ public GetLicenseResponse get(GetLicenseRequest request) throws IOException, Ela } /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @param fn * a function that initializes a builder to create the @@ -105,10 +107,11 @@ public final GetLicenseResponse get(Functionhttps://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see Documentation diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java index 2ab4a4bd9..029998023 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/license/GetLicenseRequest.java @@ -55,10 +55,11 @@ // typedef: license.get.Request /** - * This API returns information about the type of license, when it was issued, - * and when it expires, for example. For more information about the different - * types of licenses, see https://www.elastic.co/subscriptions. + * Get license information. Returns information about your Elastic license, + * including its type, its status, when it was issued, and when it expires. For + * more information about the different types of licenses, refer to + * Elastic Stack + * subscriptions. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java index b8c9eff75..06eb75505 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarEventRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_calendar_event.Request /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java index 75d602b9c..ddd02337e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarJobRequest.java @@ -58,7 +58,7 @@ // typedef: ml.delete_calendar_job.Request /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java index 999db65fc..32b6dffca 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteCalendarRequest.java @@ -56,7 +56,8 @@ // typedef: ml.delete_calendar.Request /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java index 3bebfc2a1..b6e936935 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDataFrameAnalyticsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.delete_data_frame_analytics.Request /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java index b514864b7..437e97d70 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteDatafeedRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_datafeed.Request /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java index 233573963..e5e0f459a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteFilterRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_filter.Request /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java index 59e6c4d3d..89f3b32d7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelAliasRequest.java @@ -56,7 +56,7 @@ // typedef: ml.delete_trained_model_alias.Request /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java index 86e3d9f63..ff405eda3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/DeleteTrainedModelRequest.java @@ -56,8 +56,8 @@ // typedef: ml.delete_trained_model.Request /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java index bc50996f8..2dd35f84b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java @@ -128,7 +128,8 @@ public final CompletableFuture closeJob( // ----- Endpoint: ml.delete_calendar /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @see Documentation @@ -143,7 +144,8 @@ public CompletableFuture deleteCalendar(DeleteCalendarRe } /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @param fn * a function that initializes a builder to create the @@ -161,7 +163,7 @@ public final CompletableFuture deleteCalendar( // ----- Endpoint: ml.delete_calendar_event /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see Documentation @@ -176,7 +178,7 @@ public CompletableFuture deleteCalendarEvent(Delete } /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @param fn * a function that initializes a builder to create the @@ -194,7 +196,7 @@ public final CompletableFuture deleteCalendarEvent( // ----- Endpoint: ml.delete_calendar_job /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see Documentation @@ -209,7 +211,7 @@ public CompletableFuture deleteCalendarJob(DeleteCale } /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @param fn * a function that initializes a builder to create the @@ -227,7 +229,7 @@ public final CompletableFuture deleteCalendarJob( // ----- Endpoint: ml.delete_data_frame_analytics /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see Documentation @@ -243,7 +245,7 @@ public CompletableFuture deleteDataFrameAnalyt } /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -261,7 +263,7 @@ public final CompletableFuture deleteDataFrame // ----- Endpoint: ml.delete_datafeed /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see Documentation @@ -276,7 +278,7 @@ public CompletableFuture deleteDatafeed(DeleteDatafeedRe } /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @param fn * a function that initializes a builder to create the @@ -294,7 +296,7 @@ public final CompletableFuture deleteDatafeed( // ----- Endpoint: ml.delete_filter /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -311,7 +313,7 @@ public CompletableFuture deleteFilter(DeleteFilterRequest } /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -374,8 +376,8 @@ public final CompletableFuture deleteJob( // ----- Endpoint: ml.delete_trained_model /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @see Documentation @@ -390,8 +392,8 @@ public CompletableFuture deleteTrainedModel(DeleteTr } /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @param fn * a function that initializes a builder to create the @@ -409,7 +411,7 @@ public final CompletableFuture deleteTrainedModel( // ----- Endpoint: ml.delete_trained_model_alias /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -428,7 +430,7 @@ public CompletableFuture deleteTrainedModelAlia } /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -449,9 +451,9 @@ public final CompletableFuture deleteTrainedMod // ----- Endpoint: ml.estimate_model_memory /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -466,9 +468,9 @@ public CompletableFuture estimateModelMemory(Estima } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @param fn * a function that initializes a builder to create the @@ -484,9 +486,9 @@ public final CompletableFuture estimateModelMemory( } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -501,11 +503,11 @@ public CompletableFuture estimateModelMemory() { // ----- Endpoint: ml.evaluate_data_frame /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see Documentation @@ -520,11 +522,11 @@ public CompletableFuture evaluateDataFrame(EvaluateDa } /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @param fn * a function that initializes a builder to create the @@ -542,14 +544,14 @@ public final CompletableFuture evaluateDataFrame( // ----- Endpoint: ml.flush_job /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see Documentation @@ -564,14 +566,14 @@ public CompletableFuture flushJob(FlushJobRequest request) { } /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @param fn * a function that initializes a builder to create the @@ -589,7 +591,7 @@ public final CompletableFuture flushJob( // ----- Endpoint: ml.get_calendar_events /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @see Documentation @@ -604,7 +606,7 @@ public CompletableFuture getCalendarEvents(GetCalenda } /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @param fn * a function that initializes a builder to create the @@ -622,7 +624,7 @@ public final CompletableFuture getCalendarEvents( // ----- Endpoint: ml.get_calendars /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -637,7 +639,7 @@ public CompletableFuture getCalendars(GetCalendarsRequest } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @param fn * a function that initializes a builder to create the @@ -653,7 +655,7 @@ public final CompletableFuture getCalendars( } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -668,10 +670,9 @@ public CompletableFuture getCalendars() { // ----- Endpoint: ml.get_data_frame_analytics /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -687,10 +688,9 @@ public CompletableFuture getDataFrameAnalytics( } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -706,10 +706,9 @@ public final CompletableFuture getDataFrameAnalyt } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -724,7 +723,7 @@ public CompletableFuture getDataFrameAnalytics() // ----- Endpoint: ml.get_data_frame_analytics_stats /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -740,7 +739,7 @@ public CompletableFuture getDataFrameAnalyti } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -756,7 +755,7 @@ public final CompletableFuture getDataFrameA } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -771,10 +770,10 @@ public CompletableFuture getDataFrameAnalyti // ----- Endpoint: ml.get_datafeed_stats /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -793,10 +792,10 @@ public CompletableFuture getDatafeedStats(GetDatafeedS } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -816,10 +815,10 @@ public final CompletableFuture getDatafeedStats( } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -838,10 +837,10 @@ public CompletableFuture getDatafeedStats() { // ----- Endpoint: ml.get_datafeeds /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -858,10 +857,10 @@ public CompletableFuture getDatafeeds(GetDatafeedsRequest } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -879,10 +878,10 @@ public final CompletableFuture getDatafeeds( } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -899,7 +898,7 @@ public CompletableFuture getDatafeeds() { // ----- Endpoint: ml.get_filters /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -914,7 +913,7 @@ public CompletableFuture getFilters(GetFiltersRequest reques } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @param fn * a function that initializes a builder to create the @@ -930,7 +929,7 @@ public final CompletableFuture getFilters( } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -945,7 +944,7 @@ public CompletableFuture getFilters() { // ----- Endpoint: ml.get_job_stats /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -960,7 +959,7 @@ public CompletableFuture getJobStats(GetJobStatsRequest req } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -976,7 +975,7 @@ public final CompletableFuture getJobStats( } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -991,12 +990,12 @@ public CompletableFuture getJobStats() { // ----- Endpoint: ml.get_jobs /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1011,12 +1010,12 @@ public CompletableFuture getJobs(GetJobsRequest request) { } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @param fn * a function that initializes a builder to create the @@ -1032,12 +1031,12 @@ public final CompletableFuture getJobs( } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1052,8 +1051,10 @@ public CompletableFuture getJobs() { // ----- Endpoint: ml.get_overall_buckets /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1083,8 +1084,10 @@ public CompletableFuture getOverallBuckets(GetOverall } /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1117,7 +1120,7 @@ public final CompletableFuture getOverallBuckets( // ----- Endpoint: ml.get_trained_models /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1132,7 +1135,7 @@ public CompletableFuture getTrainedModels(GetTrainedMo } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @param fn * a function that initializes a builder to create the @@ -1148,7 +1151,7 @@ public final CompletableFuture getTrainedModels( } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1163,9 +1166,9 @@ public CompletableFuture getTrainedModels() { // ----- Endpoint: ml.get_trained_models_stats /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1181,9 +1184,9 @@ public CompletableFuture getTrainedModelsStats( } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -1199,9 +1202,9 @@ public final CompletableFuture getTrainedModelsSt } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1216,7 +1219,7 @@ public CompletableFuture getTrainedModelsStats() // ----- Endpoint: ml.infer_trained_model /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see Documentation @@ -1231,7 +1234,7 @@ public CompletableFuture inferTrainedModel(InferTrain } /** - * Evaluates a trained model. + * Evaluate a trained model. * * @param fn * a function that initializes a builder to create the @@ -1249,12 +1252,12 @@ public final CompletableFuture inferTrainedModel( // ----- Endpoint: ml.open_job /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see Documentation @@ -1269,12 +1272,12 @@ public CompletableFuture openJob(OpenJobRequest request) { } /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @param fn * a function that initializes a builder to create the @@ -1292,7 +1295,7 @@ public final CompletableFuture openJob( // ----- Endpoint: ml.post_calendar_events /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @see Documentation @@ -1307,7 +1310,7 @@ public CompletableFuture postCalendarEvents(PostCale } /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @param fn * a function that initializes a builder to create the @@ -1325,7 +1328,8 @@ public final CompletableFuture postCalendarEvents( // ----- Endpoint: ml.preview_data_frame_analytics /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1341,7 +1345,8 @@ public CompletableFuture previewDataFrameAnal } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @param fn * a function that initializes a builder to create the @@ -1357,7 +1362,8 @@ public final CompletableFuture previewDataFra } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1372,7 +1378,7 @@ public CompletableFuture previewDataFrameAnal // ----- Endpoint: ml.preview_datafeed /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1400,7 +1406,7 @@ public CompletableFuture> preview } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1426,7 +1432,7 @@ public final CompletableFuture> p } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1454,7 +1460,7 @@ public CompletableFuture> preview } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1481,7 +1487,7 @@ public final CompletableFuture> p // ----- Endpoint: ml.put_calendar /** - * Creates a calendar. + * Create a calendar. * * @see Documentation @@ -1496,7 +1502,7 @@ public CompletableFuture putCalendar(PutCalendarRequest req } /** - * Creates a calendar. + * Create a calendar. * * @param fn * a function that initializes a builder to create the @@ -1514,7 +1520,7 @@ public final CompletableFuture putCalendar( // ----- Endpoint: ml.put_calendar_job /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see Documentation @@ -1529,7 +1535,7 @@ public CompletableFuture putCalendarJob(PutCalendarJobRe } /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @param fn * a function that initializes a builder to create the @@ -1547,9 +1553,9 @@ public final CompletableFuture putCalendarJob( // ----- Endpoint: ml.put_data_frame_analytics /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see Documentation @@ -1565,9 +1571,9 @@ public CompletableFuture putDataFrameAnalytics( } /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @param fn * a function that initializes a builder to create the @@ -1585,11 +1591,11 @@ public final CompletableFuture putDataFrameAnalyt // ----- Endpoint: ml.put_datafeed /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1606,11 +1612,11 @@ public CompletableFuture putDatafeed(PutDatafeedRequest req } /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1630,9 +1636,9 @@ public final CompletableFuture putDatafeed( // ----- Endpoint: ml.put_filter /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see Documentation @@ -1647,9 +1653,9 @@ public CompletableFuture putFilter(PutFilterRequest request) } /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @param fn * a function that initializes a builder to create the @@ -1704,8 +1710,8 @@ public final CompletableFuture putJob( // ----- Endpoint: ml.put_trained_model /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @see Documentation @@ -1720,8 +1726,8 @@ public CompletableFuture putTrainedModel(PutTrainedMode } /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @param fn * a function that initializes a builder to create the @@ -1739,7 +1745,7 @@ public final CompletableFuture putTrainedModel( // ----- Endpoint: ml.put_trained_model_alias /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1766,7 +1772,7 @@ public CompletableFuture putTrainedModelAlias(PutT } /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1796,7 +1802,7 @@ public final CompletableFuture putTrainedModelAlia // ----- Endpoint: ml.put_trained_model_definition_part /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see Documentation @@ -1812,7 +1818,7 @@ public CompletableFuture putTrainedModelD } /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @param fn * a function that initializes a builder to create the @@ -1830,7 +1836,7 @@ public final CompletableFuture putTrained // ----- Endpoint: ml.put_trained_model_vocabulary /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1849,7 +1855,7 @@ public CompletableFuture putTrainedModelVocab } /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1870,7 +1876,7 @@ public final CompletableFuture putTrainedMode // ----- Endpoint: ml.reset_job /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1888,7 +1894,7 @@ public CompletableFuture resetJob(ResetJobRequest request) { } /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1909,7 +1915,7 @@ public final CompletableFuture resetJob( // ----- Endpoint: ml.start_data_frame_analytics /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -1935,7 +1941,7 @@ public CompletableFuture startDataFrameAnalytic } /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -1963,7 +1969,7 @@ public final CompletableFuture startDataFrameAn // ----- Endpoint: ml.start_datafeed /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -1994,7 +2000,7 @@ public CompletableFuture startDatafeed(StartDatafeedReque } /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2028,7 +2034,7 @@ public final CompletableFuture startDatafeed( // ----- Endpoint: ml.start_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see startTrainedModelD } /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @param fn @@ -2064,8 +2070,8 @@ public final CompletableFuture startTrained // ----- Endpoint: ml.stop_data_frame_analytics /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @see Documentation @@ -2081,8 +2087,8 @@ public CompletableFuture stopDataFrameAnalytics( } /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @param fn * a function that initializes a builder to create the @@ -2100,8 +2106,8 @@ public final CompletableFuture stopDataFrameAnal // ----- Endpoint: ml.stop_datafeed /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see stopDatafeed(StopDatafeedRequest } /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @param fn @@ -2137,7 +2143,7 @@ public final CompletableFuture stopDatafeed( // ----- Endpoint: ml.stop_trained_model_deployment /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @see Documentation @@ -2153,7 +2159,7 @@ public CompletableFuture stopTrainedModelDep } /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @param fn * a function that initializes a builder to create the @@ -2171,7 +2177,7 @@ public final CompletableFuture stopTrainedMo // ----- Endpoint: ml.update_data_frame_analytics /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see Documentation @@ -2187,7 +2193,7 @@ public CompletableFuture updateDataFrameAnalyt } /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -2205,11 +2211,11 @@ public final CompletableFuture updateDataFrame // ----- Endpoint: ml.update_datafeed /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see Documentation @@ -2224,11 +2230,11 @@ public CompletableFuture updateDatafeed(UpdateDatafeedRe } /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @param fn * a function that initializes a builder to create the @@ -2246,8 +2252,8 @@ public final CompletableFuture updateDatafeed( // ----- Endpoint: ml.update_filter /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see Documentation @@ -2262,8 +2268,8 @@ public CompletableFuture updateFilter(UpdateFilterRequest } /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @param fn * a function that initializes a builder to create the @@ -2281,7 +2287,8 @@ public final CompletableFuture updateFilter( // ----- Endpoint: ml.update_job /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see Documentation @@ -2296,7 +2303,8 @@ public CompletableFuture updateJob(UpdateJobRequest request) } /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @param fn * a function that initializes a builder to create the @@ -2314,8 +2322,7 @@ public final CompletableFuture updateJob( // ----- Endpoint: ml.update_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @see Documentation @@ -2331,8 +2338,7 @@ public CompletableFuture updateTrainedMode } /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java index 9e320ec2f..2eac026f6 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java @@ -129,7 +129,8 @@ public final CloseJobResponse closeJob(FunctionDocumentation @@ -145,7 +146,8 @@ public DeleteCalendarResponse deleteCalendar(DeleteCalendarRequest request) } /** - * Removes all scheduled events from a calendar, then deletes it. + * Delete a calendar. Removes all scheduled events from a calendar, then deletes + * it. * * @param fn * a function that initializes a builder to create the @@ -164,7 +166,7 @@ public final DeleteCalendarResponse deleteCalendar( // ----- Endpoint: ml.delete_calendar_event /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @see Documentation @@ -180,7 +182,7 @@ public DeleteCalendarEventResponse deleteCalendarEvent(DeleteCalendarEventReques } /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar. * * @param fn * a function that initializes a builder to create the @@ -199,7 +201,7 @@ public final DeleteCalendarEventResponse deleteCalendarEvent( // ----- Endpoint: ml.delete_calendar_job /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @see Documentation @@ -215,7 +217,7 @@ public DeleteCalendarJobResponse deleteCalendarJob(DeleteCalendarJobRequest requ } /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar. * * @param fn * a function that initializes a builder to create the @@ -234,7 +236,7 @@ public final DeleteCalendarJobResponse deleteCalendarJob( // ----- Endpoint: ml.delete_data_frame_analytics /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @see Documentation @@ -250,7 +252,7 @@ public DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics(DeleteDataFrame } /** - * Deletes a data frame analytics job. + * Delete a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -269,7 +271,7 @@ public final DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics( // ----- Endpoint: ml.delete_datafeed /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @see Documentation @@ -285,7 +287,7 @@ public DeleteDatafeedResponse deleteDatafeed(DeleteDatafeedRequest request) } /** - * Deletes an existing datafeed. + * Delete a datafeed. * * @param fn * a function that initializes a builder to create the @@ -304,7 +306,7 @@ public final DeleteDatafeedResponse deleteDatafeed( // ----- Endpoint: ml.delete_filter /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -321,7 +323,7 @@ public DeleteFilterResponse deleteFilter(DeleteFilterRequest request) throws IOE } /** - * Deletes a filter. If an anomaly detection job references the filter, you + * Delete a filter. If an anomaly detection job references the filter, you * cannot delete the filter. You must update or delete the job before you can * delete the filter. * @@ -385,8 +387,8 @@ public final DeleteJobResponse deleteJob(FunctionDocumentation @@ -402,8 +404,8 @@ public DeleteTrainedModelResponse deleteTrainedModel(DeleteTrainedModelRequest r } /** - * Deletes an existing trained inference model that is currently not referenced - * by an ingest pipeline. + * Delete an unreferenced trained model. The request deletes a trained inference + * model that is not referenced by an ingest pipeline. * * @param fn * a function that initializes a builder to create the @@ -422,7 +424,7 @@ public final DeleteTrainedModelResponse deleteTrainedModel( // ----- Endpoint: ml.delete_trained_model_alias /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -441,7 +443,7 @@ public DeleteTrainedModelAliasResponse deleteTrainedModelAlias(DeleteTrainedMode } /** - * Deletes a trained model alias. This API deletes an existing model alias that + * Delete a trained model alias. This API deletes an existing model alias that * refers to a trained model. If the model alias is missing or refers to a model * other than the one identified by the model_id, this API returns * an error. @@ -463,9 +465,9 @@ public final DeleteTrainedModelAliasResponse deleteTrainedModelAlias( // ----- Endpoint: ml.estimate_model_memory /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -481,9 +483,9 @@ public EstimateModelMemoryResponse estimateModelMemory(EstimateModelMemoryReques } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @param fn * a function that initializes a builder to create the @@ -500,9 +502,9 @@ public final EstimateModelMemoryResponse estimateModelMemory( } /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see Documentation @@ -517,11 +519,11 @@ public EstimateModelMemoryResponse estimateModelMemory() throws IOException, Ela // ----- Endpoint: ml.evaluate_data_frame /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see Documentation @@ -537,11 +539,11 @@ public EvaluateDataFrameResponse evaluateDataFrame(EvaluateDataFrameRequest requ } /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @param fn * a function that initializes a builder to create the @@ -560,14 +562,14 @@ public final EvaluateDataFrameResponse evaluateDataFrame( // ----- Endpoint: ml.flush_job /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see Documentation @@ -582,14 +584,14 @@ public FlushJobResponse flushJob(FlushJobRequest request) throws IOException, El } /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @param fn * a function that initializes a builder to create the @@ -607,7 +609,7 @@ public final FlushJobResponse flushJob(FunctionDocumentation @@ -623,7 +625,7 @@ public GetCalendarEventsResponse getCalendarEvents(GetCalendarEventsRequest requ } /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @param fn * a function that initializes a builder to create the @@ -642,7 +644,7 @@ public final GetCalendarEventsResponse getCalendarEvents( // ----- Endpoint: ml.get_calendars /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -657,7 +659,7 @@ public GetCalendarsResponse getCalendars(GetCalendarsRequest request) throws IOE } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @param fn * a function that initializes a builder to create the @@ -674,7 +676,7 @@ public final GetCalendarsResponse getCalendars( } /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see Documentation @@ -689,10 +691,9 @@ public GetCalendarsResponse getCalendars() throws IOException, ElasticsearchExce // ----- Endpoint: ml.get_data_frame_analytics /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -708,10 +709,9 @@ public GetDataFrameAnalyticsResponse getDataFrameAnalytics(GetDataFrameAnalytics } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -728,10 +728,9 @@ public final GetDataFrameAnalyticsResponse getDataFrameAnalytics( } /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see Documentation @@ -746,7 +745,7 @@ public GetDataFrameAnalyticsResponse getDataFrameAnalytics() throws IOException, // ----- Endpoint: ml.get_data_frame_analytics_stats /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -762,7 +761,7 @@ public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats(GetDataFram } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -779,7 +778,7 @@ public final GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats( } /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see Documentation @@ -794,10 +793,10 @@ public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats() throws IO // ----- Endpoint: ml.get_datafeed_stats /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -817,10 +816,10 @@ public GetDatafeedStatsResponse getDatafeedStats(GetDatafeedStatsRequest request } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -841,10 +840,10 @@ public final GetDatafeedStatsResponse getDatafeedStats( } /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the @@ -863,10 +862,10 @@ public GetDatafeedStatsResponse getDatafeedStats() throws IOException, Elasticse // ----- Endpoint: ml.get_datafeeds /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -883,10 +882,10 @@ public GetDatafeedsResponse getDatafeeds(GetDatafeedsRequest request) throws IOE } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -905,10 +904,10 @@ public final GetDatafeedsResponse getDatafeeds( } /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * @@ -925,7 +924,7 @@ public GetDatafeedsResponse getDatafeeds() throws IOException, ElasticsearchExce // ----- Endpoint: ml.get_filters /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see Documentation @@ -940,7 +939,7 @@ public GetFiltersResponse getFilters(GetFiltersRequest request) throws IOExcepti } /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @param fn * a function that initializes a builder to create the @@ -956,7 +955,7 @@ public final GetFiltersResponse getFilters(FunctionDocumentation @@ -971,7 +970,7 @@ public GetFiltersResponse getFilters() throws IOException, ElasticsearchExceptio // ----- Endpoint: ml.get_job_stats /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -986,7 +985,7 @@ public GetJobStatsResponse getJobStats(GetJobStatsRequest request) throws IOExce } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @param fn * a function that initializes a builder to create the @@ -1003,7 +1002,7 @@ public final GetJobStatsResponse getJobStats( } /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see Documentation @@ -1018,12 +1017,12 @@ public GetJobStatsResponse getJobStats() throws IOException, ElasticsearchExcept // ----- Endpoint: ml.get_jobs /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1038,12 +1037,12 @@ public GetJobsResponse getJobs(GetJobsRequest request) throws IOException, Elast } /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @param fn * a function that initializes a builder to create the @@ -1059,12 +1058,12 @@ public final GetJobsResponse getJobs(Function_all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see Documentation @@ -1079,8 +1078,10 @@ public GetJobsResponse getJobs() throws IOException, ElasticsearchException { // ----- Endpoint: ml.get_overall_buckets /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1111,8 +1112,10 @@ public GetOverallBucketsResponse getOverallBuckets(GetOverallBucketsRequest requ } /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum @@ -1146,7 +1149,7 @@ public final GetOverallBucketsResponse getOverallBuckets( // ----- Endpoint: ml.get_trained_models /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1162,7 +1165,7 @@ public GetTrainedModelsResponse getTrainedModels(GetTrainedModelsRequest request } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @param fn * a function that initializes a builder to create the @@ -1179,7 +1182,7 @@ public final GetTrainedModelsResponse getTrainedModels( } /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see Documentation @@ -1194,9 +1197,9 @@ public GetTrainedModelsResponse getTrainedModels() throws IOException, Elasticse // ----- Endpoint: ml.get_trained_models_stats /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1212,9 +1215,9 @@ public GetTrainedModelsStatsResponse getTrainedModelsStats(GetTrainedModelsStats } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @param fn * a function that initializes a builder to create the @@ -1231,9 +1234,9 @@ public final GetTrainedModelsStatsResponse getTrainedModelsStats( } /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see Documentation @@ -1248,7 +1251,7 @@ public GetTrainedModelsStatsResponse getTrainedModelsStats() throws IOException, // ----- Endpoint: ml.infer_trained_model /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see Documentation @@ -1264,7 +1267,7 @@ public InferTrainedModelResponse inferTrainedModel(InferTrainedModelRequest requ } /** - * Evaluates a trained model. + * Evaluate a trained model. * * @param fn * a function that initializes a builder to create the @@ -1283,12 +1286,12 @@ public final InferTrainedModelResponse inferTrainedModel( // ----- Endpoint: ml.open_job /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see Documentation @@ -1303,12 +1306,12 @@ public OpenJobResponse openJob(OpenJobRequest request) throws IOException, Elast } /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @param fn * a function that initializes a builder to create the @@ -1326,7 +1329,7 @@ public final OpenJobResponse openJob(FunctionDocumentation @@ -1342,7 +1345,7 @@ public PostCalendarEventsResponse postCalendarEvents(PostCalendarEventsRequest r } /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @param fn * a function that initializes a builder to create the @@ -1361,7 +1364,8 @@ public final PostCalendarEventsResponse postCalendarEvents( // ----- Endpoint: ml.preview_data_frame_analytics /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1377,7 +1381,8 @@ public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics(PreviewDataFr } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @param fn * a function that initializes a builder to create the @@ -1394,7 +1399,8 @@ public final PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics( } /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see Documentation @@ -1409,7 +1415,7 @@ public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics() throws IOEx // ----- Endpoint: ml.preview_datafeed /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1437,7 +1443,7 @@ public PreviewDatafeedResponse previewDatafeed(PreviewDat } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1463,7 +1469,7 @@ public final PreviewDatafeedResponse previewDatafeed( } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1491,7 +1497,7 @@ public PreviewDatafeedResponse previewDatafeed(PreviewDat } /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the @@ -1519,7 +1525,7 @@ public final PreviewDatafeedResponse previewDatafeed( // ----- Endpoint: ml.put_calendar /** - * Creates a calendar. + * Create a calendar. * * @see Documentation @@ -1534,7 +1540,7 @@ public PutCalendarResponse putCalendar(PutCalendarRequest request) throws IOExce } /** - * Creates a calendar. + * Create a calendar. * * @param fn * a function that initializes a builder to create the @@ -1553,7 +1559,7 @@ public final PutCalendarResponse putCalendar( // ----- Endpoint: ml.put_calendar_job /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see Documentation @@ -1569,7 +1575,7 @@ public PutCalendarJobResponse putCalendarJob(PutCalendarJobRequest request) } /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @param fn * a function that initializes a builder to create the @@ -1588,9 +1594,9 @@ public final PutCalendarJobResponse putCalendarJob( // ----- Endpoint: ml.put_data_frame_analytics /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see Documentation @@ -1606,9 +1612,9 @@ public PutDataFrameAnalyticsResponse putDataFrameAnalytics(PutDataFrameAnalytics } /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @param fn * a function that initializes a builder to create the @@ -1627,11 +1633,11 @@ public final PutDataFrameAnalyticsResponse putDataFrameAnalytics( // ----- Endpoint: ml.put_datafeed /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1648,11 +1654,11 @@ public PutDatafeedResponse putDatafeed(PutDatafeedRequest request) throws IOExce } /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * @@ -1673,9 +1679,9 @@ public final PutDatafeedResponse putDatafeed( // ----- Endpoint: ml.put_filter /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see Documentation @@ -1690,9 +1696,9 @@ public PutFilterResponse putFilter(PutFilterRequest request) throws IOException, } /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @param fn * a function that initializes a builder to create the @@ -1747,8 +1753,8 @@ public final PutJobResponse putJob(FunctionDocumentation @@ -1764,8 +1770,8 @@ public PutTrainedModelResponse putTrainedModel(PutTrainedModelRequest request) } /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @param fn * a function that initializes a builder to create the @@ -1784,7 +1790,7 @@ public final PutTrainedModelResponse putTrainedModel( // ----- Endpoint: ml.put_trained_model_alias /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1812,7 +1818,7 @@ public PutTrainedModelAliasResponse putTrainedModelAlias(PutTrainedModelAliasReq } /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An @@ -1843,7 +1849,7 @@ public final PutTrainedModelAliasResponse putTrainedModelAlias( // ----- Endpoint: ml.put_trained_model_definition_part /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see Documentation @@ -1859,7 +1865,7 @@ public PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart( } /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @param fn * a function that initializes a builder to create the @@ -1878,7 +1884,7 @@ public final PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart // ----- Endpoint: ml.put_trained_model_vocabulary /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1897,7 +1903,7 @@ public PutTrainedModelVocabularyResponse putTrainedModelVocabulary(PutTrainedMod } /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. @@ -1919,7 +1925,7 @@ public final PutTrainedModelVocabularyResponse putTrainedModelVocabulary( // ----- Endpoint: ml.reset_job /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1937,7 +1943,7 @@ public ResetJobResponse resetJob(ResetJobRequest request) throws IOException, El } /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. @@ -1958,7 +1964,7 @@ public final ResetJobResponse resetJob(Functionindex.number_of_shards and @@ -1984,7 +1990,7 @@ public StartDataFrameAnalyticsResponse startDataFrameAnalytics(StartDataFrameAna } /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and @@ -2013,7 +2019,7 @@ public final StartDataFrameAnalyticsResponse startDataFrameAnalytics( // ----- Endpoint: ml.start_datafeed /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2045,7 +2051,7 @@ public StartDatafeedResponse startDatafeed(StartDatafeedRequest request) } /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. @@ -2080,7 +2086,7 @@ public final StartDatafeedResponse startDatafeed( // ----- Endpoint: ml.start_trained_model_deployment /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see Documentation @@ -2134,8 +2140,8 @@ public StopDataFrameAnalyticsResponse stopDataFrameAnalytics(StopDataFrameAnalyt } /** - * Stops one or more data frame analytics jobs. A data frame analytics job can - * be started and stopped multiple times throughout its lifecycle. + * Stop data frame analytics jobs. A data frame analytics job can be started and + * stopped multiple times throughout its lifecycle. * * @param fn * a function that initializes a builder to create the @@ -2154,8 +2160,8 @@ public final StopDataFrameAnalyticsResponse stopDataFrameAnalytics( // ----- Endpoint: ml.stop_datafeed /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see Documentation @@ -2208,7 +2214,7 @@ public StopTrainedModelDeploymentResponse stopTrainedModelDeployment(StopTrained } /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @param fn * a function that initializes a builder to create the @@ -2227,7 +2233,7 @@ public final StopTrainedModelDeploymentResponse stopTrainedModelDeployment( // ----- Endpoint: ml.update_data_frame_analytics /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see Documentation @@ -2243,7 +2249,7 @@ public UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics(UpdateDataFrame } /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @param fn * a function that initializes a builder to create the @@ -2262,11 +2268,11 @@ public final UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics( // ----- Endpoint: ml.update_datafeed /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see Documentation @@ -2282,11 +2288,11 @@ public UpdateDatafeedResponse updateDatafeed(UpdateDatafeedRequest request) } /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @param fn * a function that initializes a builder to create the @@ -2305,8 +2311,8 @@ public final UpdateDatafeedResponse updateDatafeed( // ----- Endpoint: ml.update_filter /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see Documentation @@ -2321,8 +2327,8 @@ public UpdateFilterResponse updateFilter(UpdateFilterRequest request) throws IOE } /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @param fn * a function that initializes a builder to create the @@ -2341,7 +2347,8 @@ public final UpdateFilterResponse updateFilter( // ----- Endpoint: ml.update_job /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see Documentation @@ -2356,7 +2363,8 @@ public UpdateJobResponse updateJob(UpdateJobRequest request) throws IOException, } /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @param fn * a function that initializes a builder to create the @@ -2374,8 +2382,7 @@ public final UpdateJobResponse updateJob(FunctionDocumentation @@ -2391,8 +2398,7 @@ public UpdateTrainedModelDeploymentResponse updateTrainedModelDeployment( } /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @param fn * a function that initializes a builder to create the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java index 1b126a9d5..9f9d1d7e9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EstimateModelMemoryRequest.java @@ -58,9 +58,9 @@ // typedef: ml.estimate_model_memory.Request /** - * Makes an estimation of the memory usage for an anomaly detection job model. - * It is based on analysis configuration details for the job and cardinality - * estimates for the fields it references. + * Estimate job model memory usage. Makes an estimation of the memory usage for + * an anomaly detection job model. It is based on analysis configuration details + * for the job and cardinality estimates for the fields it references. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java index 529e09874..e410019d9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/EvaluateDataFrameRequest.java @@ -57,11 +57,11 @@ // typedef: ml.evaluate_data_frame.Request /** - * Evaluates the data frame analytics for an annotated index. The API packages - * together commonly used evaluation metrics for various types of machine - * learning features. This has been designed for use on indexes created by data - * frame analytics. Evaluation requires both a ground truth field and an - * analytics result field to be present. + * Evaluate data frame analytics. The API packages together commonly used + * evaluation metrics for various types of machine learning features. This has + * been designed for use on indexes created by data frame analytics. Evaluation + * requires both a ground truth field and an analytics result field to be + * present. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java index 8c36c7ccb..dd33103fe 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/FlushJobRequest.java @@ -60,14 +60,14 @@ // typedef: ml.flush_job.Request /** - * Forces any buffered data to be processed by the job. The flush jobs API is - * only applicable when sending data for analysis using the post data API. - * Depending on the content of the buffer, then it might additionally calculate - * new results. Both flush and close operations are similar, however the flush - * is more efficient if you are expecting to send more data for analysis. When - * flushing, the job remains open and is available to continue analyzing data. A - * close operation additionally prunes and persists the model state to disk and - * the job must be opened again before analyzing further data. + * Force buffered data to be processed. The flush jobs API is only applicable + * when sending data for analysis using the post data API. Depending on the + * content of the buffer, then it might additionally calculate new results. Both + * flush and close operations are similar, however the flush is more efficient + * if you are expecting to send more data for analysis. When flushing, the job + * remains open and is available to continue analyzing data. A close operation + * additionally prunes and persists the model state to disk and the job must be + * opened again before analyzing further data. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java index 502335144..ae515543d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarEventsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.get_calendar_events.Request /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java index 77d997fb9..d72bf26ee 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetCalendarsRequest.java @@ -57,7 +57,7 @@ // typedef: ml.get_calendars.Request /** - * Retrieves configuration information for calendars. + * Get calendar configuration info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java index f90d2bf6f..f95b5a1fd 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsRequest.java @@ -56,10 +56,9 @@ // typedef: ml.get_data_frame_analytics.Request /** - * Retrieves configuration information for data frame analytics jobs. You can - * get information for multiple data frame analytics jobs in a single API - * request by using a comma-separated list of data frame analytics jobs or a - * wildcard expression. + * Get data frame analytics job configuration info. You can get information for + * multiple data frame analytics jobs in a single API request by using a + * comma-separated list of data frame analytics jobs or a wildcard expression. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java index 8dac370bd..e3fffbd1b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDataFrameAnalyticsStatsRequest.java @@ -56,7 +56,7 @@ // typedef: ml.get_data_frame_analytics_stats.Request /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics jobs usage info. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java index 77b2dd2c9..96b2667b5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedStatsRequest.java @@ -58,10 +58,10 @@ // typedef: ml.get_datafeed_stats.Request /** - * Retrieves usage information for datafeeds. You can get statistics for - * multiple datafeeds in a single API request by using a comma-separated list of - * datafeeds or a wildcard expression. You can get statistics for all datafeeds - * by using _all, by specifying * as the + * Get datafeeds usage info. You can get statistics for multiple datafeeds in a + * single API request by using a comma-separated list of datafeeds or a wildcard + * expression. You can get statistics for all datafeeds by using + * _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. If the datafeed is stopped, the only * information you receive is the datafeed_id and the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java index 2c3464dcd..1d316b5ad 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetDatafeedsRequest.java @@ -58,10 +58,10 @@ // typedef: ml.get_datafeeds.Request /** - * Retrieves configuration information for datafeeds. You can get information - * for multiple datafeeds in a single API request by using a comma-separated - * list of datafeeds or a wildcard expression. You can get information for all - * datafeeds by using _all, by specifying * as the + * Get datafeeds configuration info. You can get information for multiple + * datafeeds in a single API request by using a comma-separated list of + * datafeeds or a wildcard expression. You can get information for all datafeeds + * by using _all, by specifying * as the * <feed_id>, or by omitting the * <feed_id>. This API returns a maximum of 10,000 datafeeds. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java index d7b2388cf..a140b57a8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetFiltersRequest.java @@ -58,7 +58,7 @@ // typedef: ml.get_filters.Request /** - * Retrieves filters. You can get a single filter or all filters. + * Get filters. You can get a single filter or all filters. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java index 5fe10de5a..025900dac 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobStatsRequest.java @@ -55,7 +55,7 @@ // typedef: ml.get_job_stats.Request /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection jobs usage info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java index f42898708..790c1a1b4 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetJobsRequest.java @@ -58,12 +58,12 @@ // typedef: ml.get_jobs.Request /** - * Retrieves configuration information for anomaly detection jobs. You can get - * information for multiple anomaly detection jobs in a single API request by - * using a group name, a comma-separated list of jobs, or a wildcard expression. - * You can get information for all anomaly detection jobs by using - * _all, by specifying * as the - * <job_id>, or by omitting the <job_id>. + * Get anomaly detection jobs configuration info. You can get information for + * multiple anomaly detection jobs in a single API request by using a group + * name, a comma-separated list of jobs, or a wildcard expression. You can get + * information for all anomaly detection jobs by using _all, by + * specifying * as the <job_id>, or by omitting + * the <job_id>. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java index 0e0639ff8..205e34852 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetOverallBucketsRequest.java @@ -62,8 +62,10 @@ // typedef: ml.get_overall_buckets.Request /** - * Retrieves overall bucket results that summarize the bucket results of - * multiple anomaly detection jobs. + * Get overall bucket results. + *

+ * Retrievs overall bucket results that summarize the bucket results of multiple + * anomaly detection jobs. *

* The overall_score is calculated by combining the scores of all * the buckets within the overall bucket span. First, the maximum diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java index 0b1ab0cc1..31d96413d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsRequest.java @@ -59,7 +59,7 @@ // typedef: ml.get_trained_models.Request /** - * Retrieves configuration information for a trained model. + * Get trained model configuration info. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java index 2d53ddc0b..503c29688 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/GetTrainedModelsStatsRequest.java @@ -59,9 +59,9 @@ // typedef: ml.get_trained_models_stats.Request /** - * Retrieves usage information for trained models. You can get usage information - * for multiple trained models in a single API request by using a - * comma-separated list of model IDs or a wildcard expression. + * Get trained models usage info. You can get usage information for multiple + * trained models in a single API request by using a comma-separated list of + * model IDs or a wildcard expression. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java index e4f670aac..76adfd83d 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferTrainedModelRequest.java @@ -60,7 +60,7 @@ // typedef: ml.infer_trained_model.Request /** - * Evaluates a trained model. + * Evaluate a trained model. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java index 63b857ce1..1b229c7a3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/InferenceResponseResult.java @@ -69,7 +69,7 @@ public class InferenceResponseResult implements JsonpSerializable { @Nullable private final Boolean isTruncated; - private final List predictedValue; + private final List> predictedValue; @Nullable private final String predictedValueSequence; @@ -139,7 +139,7 @@ public final Boolean isTruncated() { *

* API name: {@code predicted_value} */ - public final List predictedValue() { + public final List> predictedValue() { return this.predictedValue; } @@ -233,8 +233,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.predictedValue)) { generator.writeKey("predicted_value"); generator.writeStartArray(); - for (FieldValue item0 : this.predictedValue) { - item0.serialize(generator, mapper); + for (List item0 : this.predictedValue) { + generator.writeStartArray(); + if (item0 != null) { + for (FieldValue item1 : item0) { + item1.serialize(generator, mapper); + + } + } + generator.writeEnd(); } generator.writeEnd(); @@ -304,7 +311,7 @@ public static class Builder extends WithJsonObjectBuilderBase private Boolean isTruncated; @Nullable - private List predictedValue; + private List> predictedValue; @Nullable private String predictedValueSequence; @@ -386,7 +393,7 @@ public final Builder isTruncated(@Nullable Boolean value) { *

* Adds all elements of list to predictedValue. */ - public final Builder predictedValue(List list) { + public final Builder predictedValue(List> list) { this.predictedValue = _listAddAll(this.predictedValue, list); return this; } @@ -404,28 +411,11 @@ public final Builder predictedValue(List list) { *

* Adds one or more values to predictedValue. */ - public final Builder predictedValue(FieldValue value, FieldValue... values) { + public final Builder predictedValue(List value, List... values) { this.predictedValue = _listAdd(this.predictedValue, value, values); return this; } - /** - * If the model is trained for a text classification or zero shot classification - * task, the response is the predicted class. For named entity recognition (NER) - * tasks, it contains the annotated text output. For fill mask tasks, it - * contains the top prediction for replacing the mask token. For text embedding - * tasks, it contains the raw numerical text embedding values. For regression - * models, its a numerical value For classification models, it may be an - * integer, double, boolean or string depending on prediction type - *

- * API name: {@code predicted_value} - *

- * Adds a value to predictedValue using a builder lambda. - */ - public final Builder predictedValue(Function> fn) { - return predictedValue(fn.apply(new FieldValue.Builder()).build()); - } - /** * For fill mask tasks, the response contains the input text sequence with the * mask token replaced by the predicted value. Additionally @@ -576,7 +566,8 @@ protected static void setupInferenceResponseResultDeserializer( op.add(Builder::entities, JsonpDeserializer.arrayDeserializer(TrainedModelEntities._DESERIALIZER), "entities"); op.add(Builder::isTruncated, JsonpDeserializer.booleanDeserializer(), "is_truncated"); - op.add(Builder::predictedValue, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), + op.add(Builder::predictedValue, + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER)), "predicted_value"); op.add(Builder::predictedValueSequence, JsonpDeserializer.stringDeserializer(), "predicted_value_sequence"); op.add(Builder::predictionProbability, JsonpDeserializer.doubleDeserializer(), "prediction_probability"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java index 06d0eed2d..05ff426f3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/OpenJobRequest.java @@ -59,12 +59,12 @@ // typedef: ml.open_job.Request /** - * Open anomaly detection jobs. An anomaly detection job must be opened in order - * for it to be ready to receive and analyze data. It can be opened and closed - * multiple times throughout its lifecycle. When you open a new job, it starts - * with an empty model. When you open an existing job, the most recent model - * state is automatically loaded. The job is ready to resume its analysis from - * where it left off, once new data is received. + * Open anomaly detection jobs. An anomaly detection job must be opened to be + * ready to receive and analyze data. It can be opened and closed multiple times + * throughout its lifecycle. When you open a new job, it starts with an empty + * model. When you open an existing job, the most recent model state is + * automatically loaded. The job is ready to resume its analysis from where it + * left off, once new data is received. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java index 1466adc61..891b044be 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PostCalendarEventsRequest.java @@ -59,7 +59,7 @@ // typedef: ml.post_calendar_events.Request /** - * Adds scheduled events to a calendar. + * Add scheduled events to the calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java index 5925cbd97..564caa85a 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDataFrameAnalyticsRequest.java @@ -58,7 +58,8 @@ // typedef: ml.preview_data_frame_analytics.Request /** - * Previews the extracted features used by a data frame analytics config. + * Preview features used by data frame analytics. Previews the extracted + * features used by a data frame analytics config. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java index 695097c5f..a82cac241 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PreviewDatafeedRequest.java @@ -57,7 +57,7 @@ // typedef: ml.preview_datafeed.Request /** - * Previews a datafeed. This API returns the first "page" of search + * Preview a datafeed. This API returns the first "page" of search * results from a datafeed. You can preview an existing datafeed or provide * configuration details for a datafeed and anomaly detection job in the API. * The preview shows the structure of the data that will be passed to the diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java index 7f7015320..7d83c284f 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarJobRequest.java @@ -58,7 +58,7 @@ // typedef: ml.put_calendar_job.Request /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java index 931c1285f..42d8c9681 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutCalendarRequest.java @@ -59,7 +59,7 @@ // typedef: ml.put_calendar.Request /** - * Creates a calendar. + * Create a calendar. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java index b592f2e29..850e50251 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDataFrameAnalyticsRequest.java @@ -61,9 +61,9 @@ // typedef: ml.put_data_frame_analytics.Request /** - * Instantiates a data frame analytics job. This API creates a data frame - * analytics job that performs an analysis on the source indices and stores the - * outcome in a destination index. + * Create a data frame analytics job. This API creates a data frame analytics + * job that performs an analysis on the source indices and stores the outcome in + * a destination index. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java index 1f2a23d37..15a9fc453 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java @@ -68,11 +68,11 @@ // typedef: ml.put_datafeed.Request /** - * Instantiates a datafeed. Datafeeds retrieve data from Elasticsearch for - * analysis by an anomaly detection job. You can associate only one datafeed - * with each anomaly detection job. The datafeed contains a query that runs at a - * defined interval (frequency). If you are concerned about delayed - * data, you can add a delay + * Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by + * an anomaly detection job. You can associate only one datafeed with each + * anomaly detection job. The datafeed contains a query that runs at a defined + * interval (frequency). If you are concerned about delayed data, + * you can add a delay * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` * index. * diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java index 410124696..94b1847de 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutFilterRequest.java @@ -59,9 +59,9 @@ // typedef: ml.put_filter.Request /** - * Instantiates a filter. A filter contains a list of strings. It can be used by - * one or more anomaly detection jobs. Specifically, filters are referenced in - * the custom_rules property of detector configuration objects. + * Create a filter. A filter contains a list of strings. It can be used by one + * or more anomaly detection jobs. Specifically, filters are referenced in the + * custom_rules property of detector configuration objects. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java index d5cf42412..4e0a44d8b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelAliasRequest.java @@ -56,7 +56,7 @@ // typedef: ml.put_trained_model_alias.Request /** - * Creates or updates a trained model alias. A trained model alias is a logical + * Create or update a trained model alias. A trained model alias is a logical * name used to reference a single trained model. You can use aliases instead of * trained model identifiers to make it easier to reference your models. For * example, you can use aliases in inference aggregations and processors. An diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java index cf1884af4..10630e94b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelDefinitionPartRequest.java @@ -60,7 +60,7 @@ // typedef: ml.put_trained_model_definition_part.Request /** - * Creates part of a trained model definition. + * Create part of a trained model definition. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java index 4c17d7248..05fd389fc 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java @@ -63,8 +63,8 @@ // typedef: ml.put_trained_model.Request /** - * Enables you to supply a trained model that is not created by data frame - * analytics. + * Create a trained model. Enable you to supply a trained model that is not + * created by data frame analytics. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java index 04b60e764..a53878fd5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java @@ -60,7 +60,7 @@ // typedef: ml.put_trained_model_vocabulary.Request /** - * Creates a trained model vocabulary. This API is supported only for natural + * Create a trained model vocabulary. This API is supported only for natural * language processing (NLP) models. The vocabulary is stored in the index as * described in inference_config.*.vocabulary of the trained model * definition. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java index 6e8a6bf9d..c14419d73 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/ResetJobRequest.java @@ -56,7 +56,7 @@ // typedef: ml.reset_job.Request /** - * Resets an anomaly detection job. All model state and results are deleted. The + * Reset an anomaly detection job. All model state and results are deleted. The * job is ready to start over as if it had just been created. It is not * currently possible to reset multiple jobs using wildcards or a comma * separated list. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java index af88160e1..eae117834 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDataFrameAnalyticsRequest.java @@ -56,7 +56,7 @@ // typedef: ml.start_data_frame_analytics.Request /** - * Starts a data frame analytics job. A data frame analytics job can be started + * Start a data frame analytics job. A data frame analytics job can be started * and stopped multiple times throughout its lifecycle. If the destination index * does not exist, it is created automatically the first time you start the data * frame analytics job. The index.number_of_shards and diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java index 9e5f06e5f..5dd7e4487 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartDatafeedRequest.java @@ -60,7 +60,7 @@ // typedef: ml.start_datafeed.Request /** - * Starts one or more datafeeds. + * Start datafeeds. *

* A datafeed must be started in order to retrieve data from Elasticsearch. A * datafeed can be started and stopped multiple times throughout its lifecycle. diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java index 695b6ea56..515e7b3c3 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StartTrainedModelDeploymentRequest.java @@ -57,7 +57,7 @@ // typedef: ml.start_trained_model_deployment.Request /** - * Starts a trained model deployment, which allocates the model to every machine + * Start a trained model deployment. It allocates the model to every machine * learning node. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java index 08d8d12db..6fc33948c 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopDatafeedRequest.java @@ -60,8 +60,8 @@ // typedef: ml.stop_datafeed.Request /** - * Stops one or more datafeeds. A datafeed that is stopped ceases to retrieve - * data from Elasticsearch. A datafeed can be started and stopped multiple times + * Stop datafeeds. A datafeed that is stopped ceases to retrieve data from + * Elasticsearch. A datafeed can be started and stopped multiple times * throughout its lifecycle. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java index 2d5c8d8a7..7e35541a7 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/StopTrainedModelDeploymentRequest.java @@ -56,7 +56,7 @@ // typedef: ml.stop_trained_model_deployment.Request /** - * Stops a trained model deployment. + * Stop a trained model deployment. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java index 8207c697f..1169dff4e 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentStats.java @@ -33,6 +33,7 @@ import java.lang.Integer; import java.lang.Long; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -75,7 +76,7 @@ public class TrainedModelDeploymentStats implements JsonpSerializable { private final String modelId; - private final TrainedModelDeploymentNodesStats nodes; + private final List nodes; private final int numberOfAllocations; @@ -103,7 +104,7 @@ private TrainedModelDeploymentStats(Builder builder) { this.errorCount = ApiTypeHelper.requireNonNull(builder.errorCount, this, "errorCount"); this.inferenceCount = ApiTypeHelper.requireNonNull(builder.inferenceCount, this, "inferenceCount"); this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); - this.nodes = ApiTypeHelper.requireNonNull(builder.nodes, this, "nodes"); + this.nodes = ApiTypeHelper.unmodifiableRequired(builder.nodes, this, "nodes"); this.numberOfAllocations = ApiTypeHelper.requireNonNull(builder.numberOfAllocations, this, "numberOfAllocations"); this.queueCapacity = ApiTypeHelper.requireNonNull(builder.queueCapacity, this, "queueCapacity"); @@ -184,7 +185,7 @@ public final String modelId() { *

* API name: {@code nodes} */ - public final TrainedModelDeploymentNodesStats nodes() { + public final List nodes() { return this.nodes; } @@ -298,9 +299,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("model_id"); generator.write(this.modelId); - generator.writeKey("nodes"); - this.nodes.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.nodes)) { + generator.writeKey("nodes"); + generator.writeStartArray(); + for (TrainedModelDeploymentNodesStats item0 : this.nodes) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } generator.writeKey("number_of_allocations"); generator.write(this.numberOfAllocations); @@ -353,7 +361,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String modelId; - private TrainedModelDeploymentNodesStats nodes; + private List nodes; private Integer numberOfAllocations; @@ -447,9 +455,11 @@ public final Builder modelId(String value) { * node. *

* API name: {@code nodes} + *

+ * Adds all elements of list to nodes. */ - public final Builder nodes(TrainedModelDeploymentNodesStats value) { - this.nodes = value; + public final Builder nodes(List list) { + this.nodes = _listAddAll(this.nodes, list); return this; } @@ -459,10 +469,26 @@ public final Builder nodes(TrainedModelDeploymentNodesStats value) { * node. *

* API name: {@code nodes} + *

+ * Adds one or more values to nodes. + */ + public final Builder nodes(TrainedModelDeploymentNodesStats value, TrainedModelDeploymentNodesStats... values) { + this.nodes = _listAdd(this.nodes, value, values); + return this; + } + + /** + * Required - The deployment stats for each node that currently has the model + * allocated. In serverless, stats are reported for a single unnamed virtual + * node. + *

+ * API name: {@code nodes} + *

+ * Adds a value to nodes using a builder lambda. */ public final Builder nodes( Function> fn) { - return this.nodes(fn.apply(new TrainedModelDeploymentNodesStats.Builder()).build()); + return nodes(fn.apply(new TrainedModelDeploymentNodesStats.Builder()).build()); } /** @@ -587,7 +613,8 @@ protected static void setupTrainedModelDeploymentStatsDeserializer( op.add(Builder::errorCount, JsonpDeserializer.integerDeserializer(), "error_count"); op.add(Builder::inferenceCount, JsonpDeserializer.integerDeserializer(), "inference_count"); op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); - op.add(Builder::nodes, TrainedModelDeploymentNodesStats._DESERIALIZER, "nodes"); + op.add(Builder::nodes, JsonpDeserializer.arrayDeserializer(TrainedModelDeploymentNodesStats._DESERIALIZER), + "nodes"); op.add(Builder::numberOfAllocations, JsonpDeserializer.integerDeserializer(), "number_of_allocations"); op.add(Builder::queueCapacity, JsonpDeserializer.integerDeserializer(), "queue_capacity"); op.add(Builder::rejectedExecutionCount, JsonpDeserializer.integerDeserializer(), "rejected_execution_count"); diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java index f22ba270c..3cdbec9a9 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelInferenceStats.java @@ -27,14 +27,13 @@ import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ApiTypeHelper; -import co.elastic.clients.util.DateTime; import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; +import java.lang.Long; import java.util.Objects; import java.util.function.Function; -import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -69,7 +68,7 @@ public class TrainedModelInferenceStats implements JsonpSerializable { private final int missingAllFieldsCount; - private final DateTime timestamp; + private final long timestamp; // --------------------------------------------------------------------------------------------- @@ -135,7 +134,7 @@ public final int missingAllFieldsCount() { *

* API name: {@code timestamp} */ - public final DateTime timestamp() { + public final long timestamp() { return this.timestamp; } @@ -163,7 +162,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.missingAllFieldsCount); generator.writeKey("timestamp"); - this.timestamp.serialize(generator, mapper); + generator.write(this.timestamp); } @@ -189,7 +188,7 @@ public static class Builder extends WithJsonObjectBuilderBase private Integer missingAllFieldsCount; - private DateTime timestamp; + private Long timestamp; /** * Required - The number of times the model was loaded for inference and was not @@ -242,7 +241,7 @@ public final Builder missingAllFieldsCount(int value) { *

* API name: {@code timestamp} */ - public final Builder timestamp(DateTime value) { + public final Builder timestamp(long value) { this.timestamp = value; return this; } @@ -280,7 +279,7 @@ protected static void setupTrainedModelInferenceStatsDeserializer( op.add(Builder::failureCount, JsonpDeserializer.integerDeserializer(), "failure_count"); op.add(Builder::inferenceCount, JsonpDeserializer.integerDeserializer(), "inference_count"); op.add(Builder::missingAllFieldsCount, JsonpDeserializer.integerDeserializer(), "missing_all_fields_count"); - op.add(Builder::timestamp, DateTime._DESERIALIZER, "timestamp"); + op.add(Builder::timestamp, JsonpDeserializer.longDeserializer(), "timestamp"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java index 12fe840d6..e2ad33d65 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelSizeStats.java @@ -30,7 +30,6 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -62,7 +61,7 @@ public class TrainedModelSizeStats implements JsonpSerializable { private final String modelSizeBytes; - private final int requiredNativeMemoryBytes; + private final String requiredNativeMemoryBytes; // --------------------------------------------------------------------------------------------- @@ -92,7 +91,7 @@ public final String modelSizeBytes() { *

* API name: {@code required_native_memory_bytes} */ - public final int requiredNativeMemoryBytes() { + public final String requiredNativeMemoryBytes() { return this.requiredNativeMemoryBytes; } @@ -131,7 +130,7 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private String modelSizeBytes; - private Integer requiredNativeMemoryBytes; + private String requiredNativeMemoryBytes; /** * Required - The size of the model in bytes. @@ -148,7 +147,7 @@ public final Builder modelSizeBytes(String value) { *

* API name: {@code required_native_memory_bytes} */ - public final Builder requiredNativeMemoryBytes(int value) { + public final Builder requiredNativeMemoryBytes(String value) { this.requiredNativeMemoryBytes = value; return this; } @@ -182,7 +181,7 @@ public TrainedModelSizeStats build() { protected static void setupTrainedModelSizeStatsDeserializer(ObjectDeserializer op) { op.add(Builder::modelSizeBytes, JsonpDeserializer.stringDeserializer(), "model_size_bytes"); - op.add(Builder::requiredNativeMemoryBytes, JsonpDeserializer.integerDeserializer(), + op.add(Builder::requiredNativeMemoryBytes, JsonpDeserializer.stringDeserializer(), "required_native_memory_bytes"); } diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java index 85657f097..ae28dd5d8 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDataFrameAnalyticsRequest.java @@ -60,7 +60,7 @@ // typedef: ml.update_data_frame_analytics.Request /** - * Updates an existing data frame analytics job. + * Update a data frame analytics job. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java index 219244e61..f502d7243 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java @@ -68,11 +68,11 @@ // typedef: ml.update_datafeed.Request /** - * Updates the properties of a datafeed. You must stop and start the datafeed - * for the changes to be applied. When Elasticsearch security features are - * enabled, your datafeed remembers which roles the user who updated it had at - * the time of the update and runs the query using those same roles. If you - * provide secondary authorization headers, those credentials are used instead. + * Update a datafeed. You must stop and start the datafeed for the changes to be + * applied. When Elasticsearch security features are enabled, your datafeed + * remembers which roles the user who updated it had at the time of the update + * and runs the query using those same roles. If you provide secondary + * authorization headers, those credentials are used instead. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java index a8817b7ad..6be77d51b 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateFilterRequest.java @@ -59,8 +59,8 @@ // typedef: ml.update_filter.Request /** - * Updates the description of a filter, adds items, or removes items from the - * list. + * Update a filter. Updates the description of a filter, adds items, or removes + * items from the list. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java index b68496da0..1c0f308c0 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateJobRequest.java @@ -63,7 +63,8 @@ // typedef: ml.update_job.Request /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job. Updates certain properties of an anomaly + * detection job. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java index 7a35ee534..61c818a59 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateTrainedModelDeploymentRequest.java @@ -59,8 +59,7 @@ // typedef: ml.update_trained_model_deployment.Request /** - * Starts a trained model deployment, which allocates the model to every machine - * learning node. + * Update a trained model deployment. * * @see API diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java index 3ee3d4434..c96ecda28 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/query_rules/QueryRuleType.java @@ -48,6 +48,8 @@ public enum QueryRuleType implements JsonEnum { Pinned("pinned"), + Exclude("exclude"), + ; private final String jsonValue; diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java index 6f3f2ece0..f1a8037d5 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateRequest.java @@ -50,12 +50,14 @@ // typedef: security.authenticate.Request /** - * Enables you to submit a request with a basic auth header to authenticate a - * user and retrieve information about the authenticated user. A successful call - * returns a JSON structure that shows user information such as their username, - * the roles that are assigned to the user, any assigned metadata, and - * information about the realms that authenticated and authorized the user. If - * the user cannot be authenticated, this API returns a 401 status code. + * Authenticate a user. Authenticates a user and returns information about the + * authenticated user. Include the user information in a + * basic + * auth header. A successful call returns a JSON structure that shows user + * information such as their username, the roles that are assigned to the user, + * any assigned metadata, and information about the realms that authenticated + * and authorized the user. If the user cannot be authenticated, this API + * returns a 401 status code. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java index e4823b8b9..c2f678172 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/CreateApiKeyRequest.java @@ -61,11 +61,12 @@ // typedef: security.create_api_key.Request /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see API * specification diff --git a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java index d584bcb5b..cfbe6da89 100644 --- a/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java +++ b/java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java @@ -70,12 +70,14 @@ public ElasticsearchSecurityAsyncClient withTransportOptions(@Nullable Transport // ----- Endpoint: security.authenticate /** - * Enables you to submit a request with a basic auth header to authenticate a - * user and retrieve information about the authenticated user. A successful call - * returns a JSON structure that shows user information such as their username, - * the roles that are assigned to the user, any assigned metadata, and - * information about the realms that authenticated and authorized the user. If - * the user cannot be authenticated, this API returns a 401 status code. + * Authenticate a user. Authenticates a user and returns information about the + * authenticated user. Include the user information in a + * basic + * auth header. A successful call returns a JSON structure that shows user + * information such as their username, the roles that are assigned to the user, + * any assigned metadata, and information about the realms that authenticated + * and authorized the user. If the user cannot be authenticated, this API + * returns a 401 status code. * * @see Documentation @@ -89,11 +91,12 @@ public CompletableFuture authenticate() { // ----- Endpoint: security.create_api_key /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see Documentation @@ -108,11 +111,12 @@ public CompletableFuture createApiKey(CreateApiKeyRequest } /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @param fn * a function that initializes a builder to create the @@ -128,11 +132,12 @@ public final CompletableFuture createApiKey( } /** - * Creates an API key for access without requiring basic authentication. A - * successful request returns a JSON structure that contains the API key, its - * unique id, and its name. If applicable, it also returns expiration - * information for the API key in milliseconds. NOTE: By default, API keys never - * expire. You can specify expiration information when you create the API keys. + * Create an API key. Creates an API key for access without requiring basic + * authentication. A successful request returns a JSON structure that contains + * the API key, its unique id, and its name. If applicable, it also returns + * expiration information for the API key in milliseconds. NOTE: By default, API + * keys never expire. You can specify expiration information when you create the + * API keys. * * @see Documentation @@ -147,12 +152,12 @@ public CompletableFuture createApiKey() { // ----- Endpoint: security.get_api_key /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @see Documentation @@ -167,12 +172,12 @@ public CompletableFuture getApiKey(GetApiKeyRequest request) } /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @param fn * a function that initializes a builder to create the @@ -188,12 +193,12 @@ public final CompletableFuture getApiKey( } /** - * Retrieves information for one or more API keys. NOTE: If you have only the - * manage_own_api_key privilege, this API returns only the API keys - * that you own. If you have read_security, - * manage_api_key or greater privileges (including - * manage_security), this API returns all API keys regardless of - * ownership. + * Get API key information. Retrieves information for one or more API keys. + * NOTE: If you have only the manage_own_api_key privilege, this + * API returns only the API keys that you own. If you have + * read_security, manage_api_key or greater privileges + * (including manage_security), this API returns all API keys + * regardless of ownership. * * @see Documentation @@ -208,7 +213,8 @@ public CompletableFuture getApiKey() { // ----- Endpoint: security.has_privileges /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @see Documentation @@ -223,7 +229,8 @@ public CompletableFuture hasPrivileges(HasPrivilegesReque } /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @param fn * a function that initializes a builder to create the @@ -239,7 +246,8 @@ public final CompletableFuture hasPrivileges( } /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges. Determines whether the specified user has a specified + * list of privileges. * * @see Documentation @@ -254,11 +262,11 @@ public CompletableFuture hasPrivileges() { // ----- Endpoint: security.invalidate_api_key /** - * Invalidates one or more API keys. The manage_api_key privilege - * allows deleting any API keys. The manage_own_api_key only allows - * deleting API keys that are owned by the user. In addition, with the - * manage_own_api_key privilege, an invalidation request must be - * issued in one of the three formats: + * Invalidate API keys. Invalidates one or more API keys. The + * manage_api_key privilege allows deleting any API keys. The + * manage_own_api_key only allows deleting API keys that are owned + * by the user. In addition, with the manage_own_api_key privilege, + * an invalidation request must be issued in one of the three formats: *